Code cleanup
This commit is contained in:
parent
34d2736762
commit
c858660b94
|
@ -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
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -164,7 +164,6 @@ dependencies {
|
|||
api(libs.bundles.androidx.biometric)
|
||||
|
||||
api(libs.keystone)
|
||||
api(libs.hummingbird)
|
||||
|
||||
androidTestImplementation(projects.testLib)
|
||||
androidTestImplementation(libs.bundles.androidx.test)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -52,10 +52,11 @@ abstract class BaseKeystoneScanner {
|
|||
)
|
||||
} catch (e: Exception) {
|
||||
keystoneSDK.resetQRDecoder()
|
||||
ParseKeystoneQrResult(
|
||||
latestResult = ParseKeystoneQrResult(
|
||||
progress = 0,
|
||||
isFinished = false
|
||||
)
|
||||
throw e
|
||||
}
|
||||
} else {
|
||||
ParseKeystoneQrResult(
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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()
|
Loading…
Reference in New Issue