Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S19 #2

Open
wants to merge 34 commits into
base: s19
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ Android build singed package
$ ./gradlew bundleRelease
```

### Nodeify

If you've an issue regarding crypto library when running the app. Run this command:
`node_modules/.bin/rn-nodeify --install "assert,process,buffer,crypto,stream,events,constants" --yarn --hack`


Thanks for yours donations.
------

Expand Down
9 changes: 9 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ def googleVer = getGitVersion();
android {
compileSdkVersion rootProject.ext.compileSdkVersion

lintOptions {
checkReleaseBuilds false
abortOnError false
}

dexOptions {
javaMaxHeapSize "3g"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand Down
6 changes: 6 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare module '*.jpg';
declare module '*.png';
declare module '*.json';
declare module '*.svg';
declare module 'redux-logger';
declare module 'react-native';
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* @format
*/
import './shim';
import './src/pages/tyron/assets/i18n/i18n';

import { AppRegistry } from 'react-native';
import root from './src/root';
Expand Down
49 changes: 49 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,35 @@
"@react-navigation/bottom-tabs": "^5.11.8",
"@react-navigation/native": "^5.9.3",
"@react-navigation/stack": "^5.14.3",
"@swc/core": "^1.2.192",
"@swc/wasm": "^1.2.189",
"@types/node": "*",
"@unimodules/core": "^7.1.0",
"@zilliqa-js/account": "^3.3.4",
"@zilliqa-js/proto": "^3.0.0",
"arweave": "^1.11.6",
"assert": "^1.1.1",
"axios": "^0.26.1",
"big.js": "^6.1.1",
"bn.js": "^5.2.0",
"buffer": "^6.0.3",
"bufferutil": "^4.0.1",
"canvas": "^2.5.0",
"constants-browserify": "^1.0.0",
"elliptic": "^6.5.4",
"encoding": "^0.1.0",
"events": "^3.3.0",
"expo-asset": "^8.2.2",
"hash.js": "^1.1.7",
"hmac-drbg": "^1.0.1",
"i18next": "^21.9.1",
"long": "4.0.0",
"lottie-react-native": "^4.1.3",
"numbro": "^2.3.6",
"prettier": "^2.7.1",
"process": "^0.11.10",
"react": "17.0.2",
"react-i18next": "^11.18.4",
"react-native": "^0.64.1",
"react-native-aes-crypto": "^1.3.10",
"react-native-android-location-services-dialog-box": "^2.8.2",
Expand All @@ -46,7 +60,10 @@
"react-native-ble-plx": "^2.0.3",
"react-native-camera": "^4.2.1",
"react-native-context-menu-view": "^1.2.1",
"react-native-crypto": "^2.1.0",
"react-native-device-info": "^8.4.8",
"react-native-dropdown-picker": "^5.4.2",
"react-native-encrypted-storage": "^4.0.2",
"react-native-fast-image": "^8.5.11",
"react-native-fs": "^2.16.6",
"react-native-gesture-handler": "^1.10.3",
Expand All @@ -60,6 +77,7 @@
"react-native-push-notification": "^8.1.1",
"react-native-qrcode-scanner": "^1.5.4",
"react-native-qrcode-svg": "^6.1.1",
"react-native-randombytes": "^3.0.0",
"react-native-safe-area-context": "^3.1.9",
"react-native-screens": "^2.18.1",
"react-native-share": "^7.3.3",
Expand All @@ -71,7 +89,18 @@
"react-native-webview": "^11.17.0",
"react-navigation": "^4.4.4",
"react-ridge-state": "^4.2.2",
"readable-stream": "1.0.33",
"redux": "^4.1.2",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-promise-middleware": "^6.1.2",
"rn-nodeify": "^10.3.0",
"stream-browserify": "^1.0.0",
"ts-node": "^10.8.0",
"typescript": "^4.7.2",
"tyron": "^4.9.0",
"url-parse": "^1.5.1",
"utf-8-validate": "^5.0.2",
"websocket": "^1.0.34"
},
"devDependencies": {
Expand Down Expand Up @@ -115,5 +144,25 @@
"json",
"node"
]
},
"react-native": {
"constants": "constants-browserify",
"crypto": "react-native-crypto",
"_stream_transform": "readable-stream/transform",
"_stream_readable": "readable-stream/readable",
"_stream_writable": "readable-stream/writable",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"stream": "stream-browserify"
},
"browser": {
"constants": "constants-browserify",
"crypto": "react-native-crypto",
"_stream_transform": "readable-stream/transform",
"_stream_readable": "readable-stream/readable",
"_stream_writable": "readable-stream/writable",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"stream": "stream-browserify"
}
}
9 changes: 9 additions & 0 deletions src/assets/icons/tyron.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions src/assets/icons/tyron_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/assets/icons/tyron_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/assets/icons/tyron_selected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/lib/controller/tyron/lang.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { newRidgeState } from "react-ridge-state";

export const tyronLang = newRidgeState<String>("en");
3 changes: 3 additions & 0 deletions src/lib/controller/tyron/theme.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { newRidgeState } from "react-ridge-state";

export const tyronThemeDark = newRidgeState<Boolean>(true);
5 changes: 5 additions & 0 deletions src/lib/controller/tyron/tx.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { newRidgeState } from "react-ridge-state";

export const showTxModal = newRidgeState<boolean>(false);
export const txStatus = newRidgeState<String>("false");
export const txId = newRidgeState<String>("");
6 changes: 6 additions & 0 deletions src/lib/controller/tyron/user.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { newRidgeState } from "react-ridge-state";

export const userName = newRidgeState<String>("");
export const userDomain = newRidgeState<String>("");
export const userDoc = newRidgeState<any>(null);
export const userResolved = newRidgeState<any>(null);
24 changes: 24 additions & 0 deletions src/navigator/tab-navigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,25 @@ import { useTheme } from '@react-navigation/native';

import HomeIconSVG from 'app/assets/icons/home.svg';
import TimerIconSVG from 'app/assets/icons/timer.svg';
import TyronIconSVG from 'app/assets/icons/tyron_selected.svg';
import TyronLightIconSVG from 'app/assets/icons/tyron_light.svg';
import TyronDarkIconSVG from 'app/assets/icons/tyron_dark.svg';
import BrowserIconSVG from 'app/assets/icons/browser.svg';
import SettingsIconSVG from 'app/assets/icons/settings.svg';

import HomePage from 'app/pages/home';
import { browserNav, BrwoserStackParamList } from 'app/navigator/browser';
import { tyronNav } from 'app/navigator/tyron';
import { SettingsPage } from 'app/pages/settings';
import { HistoryPage } from 'app/pages/history';
// import { Tyron } from 'app/pages/tyron';

import I18n from 'app/lib/i18n';

export type TabStackParamList = {
Home: undefined;
History: undefined;
Tyron: undefined;
Browser: BrwoserStackParamList;
Settings: undefined;
};
Expand Down Expand Up @@ -70,6 +76,24 @@ export const TabNavigator: React.FC = () => {
)
}}
/>
<TabStack.Screen
name="Tyron"
component={tyronNav}
options={{
tabBarLabel: 'TYRON',
tabBarIcon: ({ color }) => (
<>
{color === '#8E8EAE' ? (
<TyronLightIconSVG />
) : color === '#666666' ? (
<TyronDarkIconSVG />
) : (
<TyronIconSVG />
)}
</>
)
}}
/>
<TabStack.Screen
name="Browser"
component={browserNav}
Expand Down
Loading