Skip to content

Commit 56d56d7

Browse files
committed
Initial commit
Initial commit
0 parents  commit 56d56d7

File tree

246 files changed

+18264
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

246 files changed

+18264
-0
lines changed

.buckconfig

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
[android]
3+
target = Google Inc.:Google APIs:23
4+
5+
[maven_repositories]
6+
central = https://repo1.maven.org/maven2

.eslintrc.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
parser: '@typescript-eslint/parser',
5+
plugins: ['@typescript-eslint'],
6+
};

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text

.gitignore

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
24+
# Android/IntelliJ
25+
#
26+
build/
27+
.idea
28+
.gradle
29+
local.properties
30+
*.iml
31+
32+
# Visual Studio Code
33+
#
34+
.vscode/
35+
36+
# node.js
37+
#
38+
node_modules/
39+
npm-debug.log
40+
yarn-error.log
41+
42+
# BUCK
43+
buck-out/
44+
\.buckd/
45+
*.keystore
46+
!debug.keystore
47+
48+
# fastlane
49+
#
50+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
51+
# screenshots whenever they are needed.
52+
# For more information about the recommended setup visit:
53+
# https://docs.fastlane.tools/best-practices/source-control/
54+
55+
*/fastlane/report.xml
56+
*/fastlane/Preview.html
57+
*/fastlane/screenshots
58+
59+
# Bundle artifact
60+
*.jsbundle
61+
62+
# CocoaPods
63+
/ios/Pods/

.prettierrc.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
bracketSpacing: false,
3+
jsxBracketSameLine: true,
4+
singleQuote: true,
5+
trailingComma: 'all',
6+
};

.watchmanconfig

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

App.tsx

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
*
5+
* Generated with the TypeScript template
6+
* https://github.com/react-native-community/react-native-template-typescript
7+
*
8+
* @format
9+
*/
10+
11+
import './shim';
12+
import 'react-native-gesture-handler';
13+
import { NavigationContainer } from '@react-navigation/native';
14+
import { createStackNavigator } from '@react-navigation/stack';
15+
import { SafeAreaProvider } from 'react-native-safe-area-context';
16+
import React from 'react';
17+
import { Provider } from 'react-redux'
18+
import {store, persistor } from './store/WalletStateStore'
19+
import { PersistGate } from 'redux-persist/integration/react'
20+
import RootView from './views/RootView'
21+
import CreateStepOne from './views/Create/CreateStepOne'
22+
import CreateStepTwo from './views/Create/CreateStepTwo'
23+
import Restore from './views/Restore/Restore'
24+
import PickerView from './components/Settings/PickerView'
25+
import ScanQRCode from './components/ScanQRCode'
26+
import Send from './components/Send'
27+
import { StatusBar, View } from 'react-native';
28+
29+
const Stack = createStackNavigator<RootNavigationParamList>();
30+
31+
32+
const App = () => {
33+
34+
return (
35+
<Provider store={store}>
36+
<PersistGate loading={null} persistor={persistor}>
37+
<SafeAreaProvider>
38+
<NavigationContainer>
39+
<View style={{flex:1, backgroundColor:'#1A1E29'}}>
40+
<StatusBar backgroundColor="#090C14" barStyle="light-content"/>
41+
<Stack.Navigator initialRouteName="Root" headerMode="none" >
42+
<Stack.Screen name="Root" component={RootView} />
43+
<Stack.Screen name="CreateStepOne" component={CreateStepOne} />
44+
<Stack.Screen name="CreateStepTwo" component={CreateStepTwo} />
45+
<Stack.Screen name="Restore" component={Restore} />
46+
<Stack.Screen name="PickerView" component={PickerView} />
47+
<Stack.Screen name="ScanQRCode" component={ScanQRCode} />
48+
<Stack.Screen name="Send" component={Send} />
49+
</Stack.Navigator>
50+
</View>
51+
</NavigationContainer>
52+
</SafeAreaProvider>
53+
</PersistGate>
54+
</Provider>
55+
);
56+
};
57+
58+
59+
export default App;

NavigationTypes.d.ts

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
type RootNavigationParamList = {
2+
Root: undefined
3+
CreateStepOne: undefined
4+
CreateStepTwo: { words : string[] }
5+
Restore: undefined
6+
PickerView: { type : "Choose Currency" | "Choose Language" };
7+
ScanQRCode: { callBack : (address : string, amount : string | null) => void }
8+
Send: undefined
9+
};
10+
11+
type WalletHomeNavigationParamList = {
12+
Overview: undefined
13+
Send: undefined
14+
Receive: undefined
15+
Settings: undefined
16+
};

ProjectTypes.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module 'coinselect/accumulative'
2+
declare module 'coinselect/split'
3+
declare module 'electrum-client'
4+
declare module 'bip21'

__tests__/App-test.tsx

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* @format
3+
*/
4+
5+
import 'react-native';
6+
import React from 'react';
7+
import App from '../App';
8+
9+
// Note: test renderer must be required after react-native.
10+
import renderer from 'react-test-renderer';
11+
12+
it('renders correctly', () => {
13+
renderer.create(<App />);
14+
});

android/app/_BUCK

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# To learn about Buck see [Docs](https://buckbuild.com/).
2+
# To run your application with Buck:
3+
# - install Buck
4+
# - `npm start` - to start the packager
5+
# - `cd android`
6+
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7+
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8+
# - `buck install -r android/app` - compile, install and run application
9+
#
10+
11+
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12+
13+
lib_deps = []
14+
15+
create_aar_targets(glob(["libs/*.aar"]))
16+
17+
create_jar_targets(glob(["libs/*.jar"]))
18+
19+
android_library(
20+
name = "all-libs",
21+
exported_deps = lib_deps,
22+
)
23+
24+
android_library(
25+
name = "app-code",
26+
srcs = glob([
27+
"src/main/java/**/*.java",
28+
]),
29+
deps = [
30+
":all-libs",
31+
":build_config",
32+
":res",
33+
],
34+
)
35+
36+
android_build_config(
37+
name = "build_config",
38+
package = "com.bitcoinwalletmobile",
39+
)
40+
41+
android_resource(
42+
name = "res",
43+
package = "com.bitcoinwalletmobile",
44+
res = "src/main/res",
45+
)
46+
47+
android_binary(
48+
name = "app",
49+
keystore = "//android/keystores:debug",
50+
manifest = "src/main/AndroidManifest.xml",
51+
package_type = "debug",
52+
deps = [
53+
":app-code",
54+
],
55+
)

0 commit comments

Comments
 (0)