Updated on 2026-08-14

This commit is contained in:
Tangem 2020-09-25 21:45:52 +03:00
parent 926840dded
commit 6446d5357b
5 changed files with 11 additions and 3 deletions

View file

@ -71,7 +71,7 @@ class AmountMiddleware {
TransactionError.InvalidAmountValue -> TapError.InvalidAmountValue
TransactionError.InvalidFeeValue -> TapError.InvalidFeeValue
TransactionError.DustAmount -> TapError.DustAmount
TransactionError.DustChange -> TapError.DustChang
TransactionError.DustChange -> TapError.DustChange
else -> TapError.UnknownError
}
}

View file

@ -1,6 +1,7 @@
package com.tangem.tap.features.send.redux.middlewares
import com.tangem.blockchain.common.Amount
import com.tangem.blockchain.common.CreateAccountUnderfunded
import com.tangem.blockchain.common.TransactionSender
import com.tangem.blockchain.extensions.Signer
import com.tangem.blockchain.extensions.SimpleResult
@ -69,6 +70,9 @@ private fun verifyAndSendTransaction(appState: AppState?, dispatch: (Action) ->
}
is SimpleResult.Failure -> {
when (result.error) {
is CreateAccountUnderfunded ->
dispatch(SendAction.SendError(TapError.CreateAccountUnderfunded))
is Throwable -> {
val message = (result.error as Throwable).message
when {