Updated on 2026-08-14

This commit is contained in:
Tangem 2025-02-24 20:24:20 +07:00
parent a09aae7e41
commit a608cec153
5 changed files with 22 additions and 1 deletions

View file

@ -297,6 +297,21 @@ sealed class NotificationUM(val config: NotificationConfig) {
)
}
sealed interface Sui {
data object NotEnoughCoinForTokenTransaction : Error(
title = resourceReference(id = R.string.sui_not_enough_coin_for_fee_title),
subtitle = resourceReference(
id = R.string.sui_not_enough_coin_for_fee_description,
formatArgs = wrappedList(
BigDecimal.ONE.format {
crypto(Blockchain.Sui.currency, Blockchain.Sui.decimals())
},
),
),
)
}
sealed interface Koinos {
data class InsufficientRecoverableMana(
val mana: BigDecimal,

View file

@ -66,6 +66,8 @@ object NotificationsFactory {
},
),
)
is GetFeeError.BlockchainErrors.SuiOneCoinRequired ->
add(NotificationUM.Sui.NotEnoughCoinForTokenTransaction)
is GetFeeError.DataError,
is GetFeeError.UnknownError,
-> add(

View file

@ -7,5 +7,6 @@ sealed class GetFeeError {
sealed class BlockchainErrors : GetFeeError() {
data object TronActivationError : BlockchainErrors()
data object KaspaZeroUtxo : BlockchainErrors()
data object SuiOneCoinRequired : BlockchainErrors()
}
}

View file

@ -16,6 +16,9 @@ fun Result.Failure.mapToFeeError(): GetFeeError {
is BlockchainSdkError.Kaspa.ZeroUtxoError -> {
GetFeeError.BlockchainErrors.KaspaZeroUtxo
}
is BlockchainSdkError.Sui.OneSuiRequired -> {
GetFeeError.BlockchainErrors.SuiOneCoinRequired
}
else -> GetFeeError.DataError(this.error)
}
}

View file

@ -1,5 +1,5 @@
[versions]
tangemBlockchainSdk = "develop-967"
tangemBlockchainSdk = "develop-968"
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
tangemCardSdk = "develop-437"
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^