Updated on 2026-08-14

This commit is contained in:
Tangem 2020-09-28 18:31:21 +03:00
parent 0574ddfb4b
commit 5409bed291
15 changed files with 135 additions and 42 deletions

View file

@ -128,7 +128,7 @@ internal class AddressPayIdMiddleware {
//TODO: move to the blockchainSDK
private fun extractAddressFromShareUri(shareUri: String): String {
val sharePrefix = listOf("bitcoin:", "ethereum:", "ripple:", "litecoin:")
val sharePrefix = listOf("bitcoin:", "ethereum:", "xrpl:", "litecoin:", "bnb:")
val prefixes = sharePrefix.filter { shareUri.contains(it) }
return if (prefixes.isEmpty()) shareUri else shareUri.replace(prefixes[0], "")
}

View file

@ -1,10 +1,11 @@
package com.tangem.tap.features.send.redux.middlewares
import com.tangem.blockchain.common.*
import com.tangem.blockchain.extensions.Result
import com.tangem.blockchain.extensions.Signer
import com.tangem.blockchain.extensions.SimpleResult
import com.tangem.tap.common.extensions.stripZeroPlainString
import com.tangem.tap.common.redux.AppState
import com.tangem.tap.common.redux.global.GlobalAction
import com.tangem.tap.common.redux.navigation.NavigationAction
import com.tangem.tap.domain.TapError
import com.tangem.tap.features.send.redux.AddressPayIdActionUi
@ -62,12 +63,13 @@ private fun verifyAndSendTransaction(appState: AppState?, dispatch: (Action) ->
val result = (walletManager as TransactionSender).send(txData, Signer(tangemSdk))
withContext(Dispatchers.Main) {
when (result) {
is SimpleResult.Success -> {
is Result.Success -> {
dispatch(SendAction.SendSuccess)
dispatch(GlobalAction.UpdateWalletSignedHashes(result.data.walletSignedHashes))
dispatch(WalletAction.UpdateWallet)
dispatch(NavigationAction.PopBackTo())
}
is SimpleResult.Failure -> {
is Result.Failure -> {
when (result.error) {
is CreateAccountUnderfunded -> {
val error = result.error as CreateAccountUnderfunded