Updated on 2026-08-14
This commit is contained in:
parent
a09aae7e41
commit
a608cec153
5 changed files with 22 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ object NotificationsFactory {
|
|||
},
|
||||
),
|
||||
)
|
||||
is GetFeeError.BlockchainErrors.SuiOneCoinRequired ->
|
||||
add(NotificationUM.Sui.NotEnoughCoinForTokenTransaction)
|
||||
is GetFeeError.DataError,
|
||||
is GetFeeError.UnknownError,
|
||||
-> add(
|
||||
|
|
|
|||
|
|
@ -7,5 +7,6 @@ sealed class GetFeeError {
|
|||
sealed class BlockchainErrors : GetFeeError() {
|
||||
data object TronActivationError : BlockchainErrors()
|
||||
data object KaspaZeroUtxo : BlockchainErrors()
|
||||
data object SuiOneCoinRequired : BlockchainErrors()
|
||||
}
|
||||
}
|
||||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 ^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue