Updated on 2026-08-14
This commit is contained in:
parent
06e726d9ad
commit
a6ec3453dd
5 changed files with 69 additions and 44 deletions
|
|
@ -44,10 +44,12 @@ object NotificationsFactory {
|
|||
}
|
||||
}
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
fun MutableList<NotificationUM>.addFeeUnreachableNotification(
|
||||
tokenStatus: CryptoCurrencyStatus,
|
||||
coinStatus: CryptoCurrencyStatus,
|
||||
feeError: GetFeeError?,
|
||||
dustValue: BigDecimal?,
|
||||
onReload: () -> Unit,
|
||||
onClick: (currency: CryptoCurrency) -> Unit,
|
||||
) {
|
||||
|
|
@ -70,7 +72,16 @@ object NotificationsFactory {
|
|||
)
|
||||
is GetFeeError.BlockchainErrors.SuiOneCoinRequired ->
|
||||
add(NotificationUM.Sui.NotEnoughCoinForTokenTransaction)
|
||||
is GetFeeError.DataError,
|
||||
is GetFeeError.DataError -> when (feeError.cause) {
|
||||
BlockchainSdkError.TransactionDustChangeError -> add(
|
||||
NotificationUM.Error.MinimumAmountError(
|
||||
amount = dustValue.format { crypto(tokenStatus.currency) },
|
||||
),
|
||||
)
|
||||
else -> add(
|
||||
NotificationUM.Warning.NetworkFeeUnreachable(onReload),
|
||||
)
|
||||
}
|
||||
is GetFeeError.UnknownError,
|
||||
-> add(
|
||||
NotificationUM.Warning.NetworkFeeUnreachable(onReload),
|
||||
|
|
@ -358,6 +369,11 @@ object NotificationsFactory {
|
|||
is BlockchainSdkError.Solana.DestinationRentExemption -> addRentExemptionDestinationNotification(
|
||||
rentExemptionAmount = validationError.rentAmount,
|
||||
)
|
||||
is BlockchainSdkError.TransactionDustChangeError -> add(
|
||||
NotificationUM.Error.MinimumAmountError(
|
||||
amount = dustValue.format { crypto(cryptoCurrency) },
|
||||
),
|
||||
)
|
||||
null,
|
||||
-> minAdaValue?.let {
|
||||
add(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue