From 3a5499856fbf23add9e0de8988ad35389bd9ce53 Mon Sep 17 00:00:00 2001 From: chyngyz Date: Wed, 10 Jan 2024 15:53:24 +0600 Subject: [PATCH 1/3] Fix syncing issues in Tron and Bitcoin --- app/build.gradle | 12 ++++++------ .../bankwallet/core/managers/TronKitManager.kt | 4 ++-- .../bankwallet/core/providers/AppConfigProvider.kt | 4 ++-- .../addtoken/AddTronTokenBlockchainService.kt | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index daff319ed89..4765cc70c92 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,8 +17,8 @@ android { compileSdk compile_sdk_version minSdkVersion min_sdk_version targetSdkVersion compile_sdk_version - versionCode 94 - versionName "0.37.0" + versionCode 95 + versionName "0.37.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" kapt { @@ -91,7 +91,7 @@ android { resValue "string", "openSeaApiKey", "bfbd6061a33e455c8581b594774fecb3" resValue "string", "walletConnectV2Key", "8b4f41c60880a3e3ad57d82fddb30568" resValue "string", "solscanApiKey", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjcmVhdGVkQXQiOjE2Nzk0NjQyMTQ4NDAsImVtYWlsIjoiaHJ6c3lzdGVtczEwMUBnbWFpbC5jb20iLCJhY3Rpb24iOiJ0b2tlbi1hcGkiLCJpYXQiOjE2Nzk0NjQyMTR9.BRM7J9RbDpHgd2oMAus00XfWOxTJgV2Tn2_chXZOdtk" - resValue "string", "trongridApiKey", "33374494-8060-447e-8367-90c5efd4ed95" + resValue "string", "trongridApiKeys", "33374494-8060-447e-8367-90c5efd4ed95" resValue "string", "udnApiKey", "r2phzgatt_zt9-hd_wyvdjrdsrimnxgokm7knyag1malzgcz" resValue "string", "oneInchApiKey", "ElyK7s22HR0JD78CEXVPnpZA8UyuUwIl" resValue "string", "blockchairApiKey", "M___unstoppn7jfFpe40X___________" @@ -133,7 +133,7 @@ android { resValue "string", "openSeaApiKey", "bfbd6061a33e455c8581b594774fecb3" resValue "string", "walletConnectV2Key", "0c5ca155c2f165a7d0c88686f2113a72" resValue "string", "solscanApiKey", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjcmVhdGVkQXQiOjE2Nzk0NjQxMTQ0ODUsImVtYWlsIjoiaHNkYW84ODg4QGdtYWlsLmNvbSIsImFjdGlvbiI6InRva2VuLWFwaSIsImlhdCI6MTY3OTQ2NDExNH0.91DUjjjYu86f1ZMMJ5cyJxIKTTw_srhI-vNgYaTCPUU" - resValue "string", "trongridApiKey", "8f5ae2c8-8012-42a8-b0ca-ffc2741f6a29" + resValue "string", "trongridApiKeys", "8f5ae2c8-8012-42a8-b0ca-ffc2741f6a29,578aa64f-a79f-4ee8-86e9-e9860e2d050a,1e92f1fc-41f8-401f-a7f6-5b719b6f1280" resValue "string", "udnApiKey", "r2phzgatt_zt9-hd_wyvdjrdsrimnxgokm7knyag1malzgcz" resValue "string", "oneInchApiKey", "ElyK7s22HR0JD78CEXVPnpZA8UyuUwIl" resValue "string", "blockchairApiKey", "M___unstoppn7jfFpe40X___________" @@ -273,13 +273,13 @@ dependencies { // Wallet kits implementation 'com.github.horizontalsystems:ton-kit-kmm:18bc110' - implementation 'com.github.horizontalsystems:bitcoin-kit-android:59b8e4e' + implementation 'com.github.horizontalsystems:bitcoin-kit-android:6ff6456' implementation 'com.github.horizontalsystems:ethereum-kit-android:3a02f3a' implementation 'com.github.horizontalsystems:blockchain-fee-rate-kit-android:1d3bd49' implementation 'com.github.horizontalsystems:binance-chain-kit-android:c1509a2' implementation 'com.github.horizontalsystems:market-kit-android:746d398' implementation 'com.github.horizontalsystems:solana-kit-android:34ef394' - implementation 'com.github.horizontalsystems:tron-kit-android:5eb6395' + implementation 'com.github.horizontalsystems:tron-kit-android:f2f7c9a' // Zcash SDK implementation "cash.z.ecc.android:zcash-android-sdk:2.0.1" implementation("io.github.binance:binance-connector-java:3.0.0rc2") { diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/core/managers/TronKitManager.kt b/app/src/main/java/io/horizontalsystems/bankwallet/core/managers/TronKitManager.kt index 0c18d28f70a..40c097c1f54 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/core/managers/TronKitManager.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/core/managers/TronKitManager.kt @@ -82,7 +82,7 @@ class TronKitManager( walletId = account.id, seed = seed, network = network, - tronGridApiKey = appConfigProvider.trongridApiKey + tronGridApiKeys = appConfigProvider.trongridApiKeys ) return TronKitWrapper(kit, signer) @@ -99,7 +99,7 @@ class TronKitManager( address = Address.fromBase58(address), network = network, walletId = account.id, - tronGridApiKey = appConfigProvider.trongridApiKey + tronGridApiKeys = appConfigProvider.trongridApiKeys ) return TronKitWrapper(kit, null) diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/core/providers/AppConfigProvider.kt b/app/src/main/java/io/horizontalsystems/bankwallet/core/providers/AppConfigProvider.kt index fc152c64cdc..86c18b960ae 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/core/providers/AppConfigProvider.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/core/providers/AppConfigProvider.kt @@ -97,8 +97,8 @@ class AppConfigProvider(localStorage: ILocalStorage) { Translator.getString(R.string.solscanApiKey) } - val trongridApiKey by lazy { - Translator.getString(R.string.trongridApiKey) + val trongridApiKeys: List by lazy { + Translator.getString(R.string.trongridApiKeys).split(",") } val udnApiKey by lazy { diff --git a/app/src/main/java/io/horizontalsystems/bankwallet/modules/addtoken/AddTronTokenBlockchainService.kt b/app/src/main/java/io/horizontalsystems/bankwallet/modules/addtoken/AddTronTokenBlockchainService.kt index b4c611f9dab..7007b989997 100644 --- a/app/src/main/java/io/horizontalsystems/bankwallet/modules/addtoken/AddTronTokenBlockchainService.kt +++ b/app/src/main/java/io/horizontalsystems/bankwallet/modules/addtoken/AddTronTokenBlockchainService.kt @@ -43,7 +43,7 @@ class AddTronTokenBlockchainService( companion object { fun getInstance(blockchain: Blockchain): AddTronTokenBlockchainService { - val trc20Provider = Trc20Provider.getInstance(Network.Mainnet, App.appConfigProvider.trongridApiKey) + val trc20Provider = Trc20Provider.getInstance(Network.Mainnet, App.appConfigProvider.trongridApiKeys) return AddTronTokenBlockchainService(blockchain, trc20Provider) } } From 371a680daf07b15e65b6cbdce1f85c16cc2e166a Mon Sep 17 00:00:00 2001 From: chyngyz Date: Mon, 15 Jan 2024 12:22:40 +0600 Subject: [PATCH 2/3] Update bitcoin-kit, get bug fix --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 4765cc70c92..87240abb87d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -273,7 +273,7 @@ dependencies { // Wallet kits implementation 'com.github.horizontalsystems:ton-kit-kmm:18bc110' - implementation 'com.github.horizontalsystems:bitcoin-kit-android:6ff6456' + implementation 'com.github.horizontalsystems:bitcoin-kit-android:2e0d857' implementation 'com.github.horizontalsystems:ethereum-kit-android:3a02f3a' implementation 'com.github.horizontalsystems:blockchain-fee-rate-kit-android:1d3bd49' implementation 'com.github.horizontalsystems:binance-chain-kit-android:c1509a2' From 4a1722ceb1c38fc2970e20197acdd5176fdb3ee8 Mon Sep 17 00:00:00 2001 From: chyngyz Date: Mon, 15 Jan 2024 14:43:12 +0600 Subject: [PATCH 3/3] Set version to 0.37.2, update bitcoin-kit --- app/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 87240abb87d..86d6edb4fc5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,8 +17,8 @@ android { compileSdk compile_sdk_version minSdkVersion min_sdk_version targetSdkVersion compile_sdk_version - versionCode 95 - versionName "0.37.1" + versionCode 96 + versionName "0.37.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" kapt { @@ -273,7 +273,7 @@ dependencies { // Wallet kits implementation 'com.github.horizontalsystems:ton-kit-kmm:18bc110' - implementation 'com.github.horizontalsystems:bitcoin-kit-android:2e0d857' + implementation 'com.github.horizontalsystems:bitcoin-kit-android:662d6dc' implementation 'com.github.horizontalsystems:ethereum-kit-android:3a02f3a' implementation 'com.github.horizontalsystems:blockchain-fee-rate-kit-android:1d3bd49' implementation 'com.github.horizontalsystems:binance-chain-kit-android:c1509a2'