diff --git a/gradle.properties b/gradle.properties index f8cb13b6..5f0e739b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -212,8 +212,7 @@ ZCASH_ANDROID_WALLET_PLUGINS_VERSION=1.0.0 ZXING_VERSION=3.5.3 ZIP_321_VERSION = 0.0.6 ZCASH_BIP39_VERSION=1.0.8 -KEYSTONE_VERSION=0.7.3 -HUMMINGBIRD_VERSION=1.7.4 +KEYSTONE_VERSION=0.7.8 FLEXA_VERSION=1.0.9 diff --git a/settings.gradle.kts b/settings.gradle.kts index 8f3aa82d..e065684c 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -191,8 +191,6 @@ dependencyResolutionManagement { val koinVersion = extra["KOIN_VERSION"].toString() val flexaVersion = extra["FLEXA_VERSION"].toString() val keystoneVersion = extra["KEYSTONE_VERSION"].toString() - val hummingBirdVersion = extra["HUMMINGBIRD_VERSION"].toString() - // Standalone versions version("flank", flankVersion) @@ -260,7 +258,6 @@ dependencyResolutionManagement { library("flexa-core", "com.flexa:core:$flexaVersion") library("flexa-spend", "com.flexa:spend:$flexaVersion") library("keystone", "com.github.KeystoneHQ:keystone-sdk-android:$keystoneVersion") - library("hummingbird", "com.sparrowwallet:hummingbird:$hummingBirdVersion") // Test libraries library("androidx-compose-test-junit", "androidx.compose.ui:ui-test-junit4:$androidxComposeVersion") diff --git a/ui-lib/build.gradle.kts b/ui-lib/build.gradle.kts index ab2e8039..2ec83806 100644 --- a/ui-lib/build.gradle.kts +++ b/ui-lib/build.gradle.kts @@ -164,7 +164,6 @@ dependencies { api(libs.bundles.androidx.biometric) api(libs.keystone) - api(libs.hummingbird) androidTestImplementation(projects.testLib) androidTestImplementation(libs.bundles.androidx.test) diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/common/repository/KeystoneProposalRepository.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/common/repository/KeystoneProposalRepository.kt index 66e896d6..74f940f5 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/common/repository/KeystoneProposalRepository.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/common/repository/KeystoneProposalRepository.kt @@ -8,7 +8,6 @@ import co.electriccoin.zcash.ui.common.datasource.ProposalDataSource import co.electriccoin.zcash.ui.common.datasource.TransactionProposal import co.electriccoin.zcash.ui.common.datasource.TransactionProposalNotCreatedException import co.electriccoin.zcash.ui.screen.sendconfirmation.model.SubmitResult -import co.electriccoin.zcash.ui.util.zcash import com.keystone.sdk.KeystoneSDK import com.sparrowwallet.hummingbird.UR import com.sparrowwallet.hummingbird.UREncoder diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/common/usecase/ParseKeystonePCZTUseCase.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/common/usecase/ParseKeystonePCZTUseCase.kt index c3643e10..c6a33d6b 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/common/usecase/ParseKeystonePCZTUseCase.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/common/usecase/ParseKeystonePCZTUseCase.kt @@ -52,10 +52,11 @@ abstract class BaseKeystoneScanner { ) } catch (e: Exception) { keystoneSDK.resetQRDecoder() - ParseKeystoneQrResult( + latestResult = ParseKeystoneQrResult( progress = 0, isFinished = false ) + throw e } } else { ParseKeystoneQrResult( diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/common/usecase/ParseKeystoneSignInRequestUseCase.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/common/usecase/ParseKeystoneSignInRequestUseCase.kt index 9176ac82..f655f5d5 100644 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/common/usecase/ParseKeystoneSignInRequestUseCase.kt +++ b/ui-lib/src/main/java/co/electriccoin/zcash/ui/common/usecase/ParseKeystoneSignInRequestUseCase.kt @@ -8,13 +8,13 @@ class ParseKeystoneSignInRequestUseCase( private val navigationRouter: NavigationRouter ) : BaseKeystoneScanner() { override suspend fun onSuccess(ur: UR) { - tryParse(ur) + parseOrThrow(ur) navigationRouter.replace(SelectKeystoneAccount(ur.toString())) } @Suppress("TooGenericExceptionCaught") @Throws(InvalidKeystoneSignInQRException::class) - private fun tryParse(ur: UR) { + private fun parseOrThrow(ur: UR) { try { keystoneSDK.parseZcashAccounts(ur) } catch (e: Exception) { diff --git a/ui-lib/src/main/java/co/electriccoin/zcash/ui/util/KeystoneUtils.kt b/ui-lib/src/main/java/co/electriccoin/zcash/ui/util/KeystoneUtils.kt deleted file mode 100644 index 90c03471..00000000 --- a/ui-lib/src/main/java/co/electriccoin/zcash/ui/util/KeystoneUtils.kt +++ /dev/null @@ -1,7 +0,0 @@ -package co.electriccoin.zcash.ui.util - -import com.keystone.sdk.KeystoneSDK -import com.keystone.sdk.KeystoneZcashSDK - -val KeystoneSDK.zcash: KeystoneZcashSDK - get() = KeystoneZcashSDK()