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 all 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
41 changes: 26 additions & 15 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@ project.ext.react = [

apply from: "../../node_modules/react-native/react.gradle"

def getNpmVersion() {
def inputFile = new File("../package.json")
def packageJson = new JsonSlurper().parseText(inputFile.text)
return packageJson["version"]
}
/* calculated from git commits to give sequential integers */
def getGitVersion() {
def process = "git rev-list master --first-parent --count".execute()
return process.text.toInteger()
}
// def getNpmVersion() {
// def inputFile = new File("../package.json")
// def packageJson = new JsonSlurper().parseText(inputFile.text)
// return packageJson["version"]
// }
// /* calculated from git commits to give sequential integers */
// def getGitVersion() {
// def process = "git rev-list master --first-parent --count".execute()
// return process.text.toInteger()
// }

/**
* Set this to true to create two separate APKs instead of one:
Expand Down Expand Up @@ -131,12 +131,21 @@ def jscFlavor = 'org.webkit:android-jsc:+'
*/
def enableHermes = project.ext.react.get("enableHermes", false);

def userVer = getNpmVersion();
def googleVer = getGitVersion();
// def userVer = getNpmVersion();
// 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 All @@ -146,8 +155,8 @@ android {
applicationId "com.zilpaymobile"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode googleVer
versionName userVer
// versionCode googleVer
// versionName userVer
missingDimensionStrategy 'react-native-camera', 'general'
multiDexEnabled true
}
Expand Down Expand Up @@ -198,7 +207,8 @@ android {
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
// versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
versionCodes.get(abi) * 1048576
}

}
Expand All @@ -209,6 +219,7 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
implementation project(':lottie-react-native')

implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.List;
import com.crypto.CryptoPackage;
import com.screenshotLock.ScreenshotLockPackage;
import com.airbnb.android.react.lottie.LottiePackage;

public class MainApplication extends Application implements ReactApplication {

Expand All @@ -31,6 +32,7 @@ protected List<ReactPackage> getPackages() {
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
packages.add(new CryptoPackage());
packages.add(new LottiePackage());
packages.add(new ScreenshotLockPackage());
return packages;
}
Expand Down
5 changes: 3 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ buildscript {

allprojects {
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
Expand All @@ -34,7 +35,7 @@ allprojects {
maven { url "https://maven.google.com" }

google()
jcenter()
// jcenter()
maven { url 'https://www.jitpack.io' }
}
}
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ include ':react-native-aes-crypto'
project(':react-native-aes-crypto').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-aes-crypto/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
include ':lottie-react-native'
project(':lottie-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/lottie-react-native/src/android')
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
50 changes: 48 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,36 @@
"@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/proto": "^3.0.0",
"@zilliqa-js/account": "^3.3.4",
"@zilliqa-js/proto": "3.3.4",
"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",
"lottie-ios": "3.4.0",
"lottie-react-native": "^5.1.4",
"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 +61,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 +78,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 +90,14 @@
"react-native-webview": "^11.17.0",
"react-navigation": "^4.4.4",
"react-ridge-state": "^4.2.2",
"readable-stream": "1.0.33",
"rn-nodeify": "^10.3.0",
"stream-browserify": "^1.0.0",
"ts-node": "^10.8.0",
"typescript": "^4.7.2",
"tyron": "4.10.0",
"url-parse": "^1.5.1",
"utf-8-validate": "^5.0.2",
"websocket": "^1.0.34"
},
"devDependencies": {
Expand Down Expand Up @@ -115,5 +141,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.
12 changes: 12 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.
13 changes: 13 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.
10 changes: 10 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");
4 changes: 4 additions & 0 deletions src/lib/controller/tyron/modal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { newRidgeState } from "react-ridge-state";

export const modalBuyNft = newRidgeState<boolean>(false);
export const modalConnect = newRidgeState<boolean>(false);
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);
6 changes: 6 additions & 0 deletions src/lib/controller/tyron/tx.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { newRidgeState } from "react-ridge-state";

export const showTxModal = newRidgeState<boolean>(false);
export const txModalMinimized = newRidgeState<boolean>(false);
export const txStatus = newRidgeState<String>("false");
export const txId = newRidgeState<String>("");
7 changes: 7 additions & 0 deletions src/lib/controller/tyron/user.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
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);
export const loginInfo = newRidgeState<any>(null);
Loading