Skip to content

Commit f4b1e4c

Browse files
committed
Merge branch v1.40.930
2 parents e06e94d + 31bef39 commit f4b1e4c

File tree

94 files changed

+1397
-1339
lines changed

Some content is hidden

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

94 files changed

+1397
-1339
lines changed

android/app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ android {
133133
minSdkVersion rootProject.ext.minSdkVersion
134134
targetSdkVersion rootProject.ext.targetSdkVersion
135135
versionCode 1
136-
versionName "1.40.910"
136+
versionName "1.40.930"
137137

138138
missingDimensionStrategy 'react-native-camera', 'general'
139139
multiDexEnabled true
@@ -216,6 +216,7 @@ android {
216216
}
217217

218218
dependencies {
219+
implementation project(':react-native-branch')
219220
implementation project(':react-native-vector-icons')
220221
implementation 'androidx.multidex:multidex:2.0.1'
221222

android/app/proguard-rules.pro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@
88
# http://developer.android.com/guide/developing/tools/proguard.html
99

1010
# Add any project specific keep options here:
11+
12+
-dontwarn io.branch.**

android/app/src/main/AndroidManifest.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@
7070
<category android:name="android.intent.category.BROWSABLE" />
7171
<data android:scheme="wc" />
7272
</intent-filter>
73+
<intent-filter>
74+
<data android:scheme="branchandroid" />
75+
<action android:name="android.intent.action.VIEW" />
76+
<category android:name="android.intent.category.DEFAULT" />
77+
<category android:name="android.intent.category.BROWSABLE" />
78+
</intent-filter>
79+
<intent-filter android:autoVerify="true">
80+
<action android:name="android.intent.action.VIEW" />
81+
<category android:name="android.intent.category.DEFAULT" />
82+
<category android:name="android.intent.category.BROWSABLE" />
83+
<data android:scheme="https" android:host="uobg.app.link" />
84+
</intent-filter>
7385
</activity>
7486
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
7587
<receiver android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"
@@ -80,6 +92,8 @@
8092
</intent-filter>
8193
</receiver>
8294
<service android:name="com.google.android.gms.analytics.CampaignTrackingService" android:enabled="true" android:exported="false" />
95+
<meta-data android:name="io.branch.sdk.BranchKey" android:value="key_live_pdZCA7n8hLlwZdxQZnuxTplmyynGtAqP"/>
96+
<meta-data android:name="io.branch.sdk.BranchKey.test" android:value="key_test_gc9DB1aZhVdyWpBQXcDFLokgytkHyvEX"/>
8397
</application>
8498

8599
</manifest>

android/app/src/main/java/com/trusteewallet/MainActivity.java

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
import android.graphics.Color;
1515

16+
import io.branch.rnbranch.*;
17+
import android.content.Intent;
18+
1619
public class MainActivity extends ReactActivity {
1720

1821
@Override
@@ -48,14 +51,26 @@ public void onConfigurationChanged(Configuration newConfig) {
4851
}
4952

5053
@Override
51-
protected ReactActivityDelegate createReactActivityDelegate() {
52-
return new ReactActivityDelegate(this, getMainComponentName()) {
53-
@Override
54-
protected ReactRootView createRootView() {
55-
return new RNGestureHandlerEnabledRootView(MainActivity.this);
56-
}
57-
};
58-
}
54+
protected ReactActivityDelegate createReactActivityDelegate() {
55+
return new ReactActivityDelegate(this, getMainComponentName()) {
56+
@Override
57+
protected ReactRootView createRootView() {
58+
return new RNGestureHandlerEnabledRootView(MainActivity.this);
59+
}
60+
};
61+
}
62+
63+
@Override
64+
protected void onStart() {
65+
super.onStart();
66+
RNBranchModule.initSession(getIntent().getData(), this);
67+
}
68+
69+
@Override
70+
public void onNewIntent(Intent intent) {
71+
super.onNewIntent(intent);
72+
RNBranchModule.onNewIntent(intent);
73+
}
5974

6075
protected String getMainComponentName() {
6176
return "TrusteeWallet";

android/app/src/main/java/com/trusteewallet/MainApplication.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import java.security.Security;
2121
import android.webkit.WebView;
2222

23+
import io.branch.rnbranch.RNBranchModule;
24+
2325
public class MainApplication extends MultiDexApplication implements ReactApplication {
2426

2527
private final ReactNativeHost mReactNativeHost =
@@ -55,6 +57,7 @@ public void onCreate() {
5557
SoLoader.init(this, /* native exopackage */ false);
5658
initializeFlipper(this); // Remove this line if you don't want Flipper enabled
5759
WebView.setWebContentsDebuggingEnabled(true);
60+
RNBranchModule.getAutoInstance(this);
5861
}
5962

6063
/**

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ buildscript {
1616
mavenCentral()
1717
}
1818
dependencies {
19-
classpath("com.android.tools.build:gradle:3.4.2")
19+
classpath('com.android.tools.build:gradle:4.1.2')
2020
classpath 'com.google.gms:google-services:4.2.0'
2121
classpath 'io.fabric.tools:gradle:1.25.4'
2222

android/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
rootProject.name = 'TrusteeWallet'
2+
include ':react-native-branch'
3+
project(':react-native-branch').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-branch/android')
24
include ':react-native-vector-icons'
35
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
46
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)

app/appstores/Actions/App/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ class App {
158158

159159
await Log.log('ACT/App appRefreshWalletsStates called from ' + source + ' firstTimeCall ' + JSON.stringify(firstTimeCall))
160160

161+
await CashBackUtils.init({},'ACT/App appRefreshWalletsStates called from' + source)
162+
161163
await walletActions.setAvailableWallets()
162164

163165
await setSelectedWallet('ACT/App appRefreshWalletsStates called from ' + source)
@@ -177,8 +179,6 @@ class App {
177179

178180
// await UpdateCashBackDataDaemon.updateCashBackDataDaemon({source : 'UpdateCashBackDataDaemon.AppHomeScreen'})
179181

180-
await CashBackUtils.init({},'ACT/App appRefreshWalletsStates init ' + firstTimeCall)
181-
182182
} else {
183183
await Daemon.forceAll(params)
184184

app/appstores/DataSource/Account/Account.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class Account {
235235
}
236236
SAVED_UNIQUE[uniqueDBKey] = 1
237237
} else {
238-
Log.daemon('DS/Account insert account ' + uniqueDBKey + '/' + privateStoregeKey + ' not ok / already in cache', SAVED_UNIQUE[privateStoregeKey])
238+
Log.daemon('DS/Account insert account ' + uniqueDBKey + '/' + privateStorageKey + ' not ok / already in cache', SAVED_UNIQUE[privateStorageKey])
239239
}
240240
}
241241
}

app/appstores/DataSource/Database/core/init/index.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,22 @@ export default class DBInit {
3737
this.#db = dbInterface;
3838
}
3939

40-
async init() {
40+
async init(onlyUpdate = false) {
4141
const { initQuery, isEmptyQuery } = this.#tableQueries;
42-
const res = await this.#db.query(isEmptyQuery)
42+
const { maxVersion } = this.#tableUpdateQueries
43+
44+
if (!onlyUpdate) {
45+
const res = await this.#db.query(isEmptyQuery)
46+
if (res && typeof res.array !== 'undefined' && res.array.length !== 0) {
47+
onlyUpdate = true
48+
}
49+
}
4350
let countError = 0;
4451
let updateError = false
4552
try {
46-
if (res.array.length !== 0) {
53+
if (onlyUpdate) {
4754
await this.#update();
48-
return;
55+
return maxVersion;
4956
}
5057
} catch (e) {
5158
Log.err('DBInit error on update');
@@ -74,6 +81,8 @@ export default class DBInit {
7481
await this._initSettings();
7582
await this._initCurrency();
7683
}
84+
85+
return maxVersion;
7786
}
7887

7988
/**

0 commit comments

Comments
 (0)