Updated on 2026-08-14
This commit is contained in:
parent
31792ce863
commit
35b58e96c4
1 changed files with 5 additions and 2 deletions
|
|
@ -200,7 +200,8 @@ class GetCurrencyWarningsUseCase(
|
|||
}
|
||||
feePaidCurrency is FeePaidCurrency.Token -> {
|
||||
val feePaidTokenBalance = feePaidCurrency.balance
|
||||
if (!tokenStatus.value.amount.isZero() && feePaidTokenBalance.isZero()) {
|
||||
val amount = tokenStatus.value.amount ?: return null
|
||||
if (!amount.isZero() && feePaidTokenBalance.isZero()) {
|
||||
constructTokenBalanceNotEnoughWarning(
|
||||
userWalletId = userWalletId,
|
||||
tokenStatus = tokenStatus,
|
||||
|
|
@ -222,7 +223,9 @@ class GetCurrencyWarningsUseCase(
|
|||
val token = currenciesRepository
|
||||
.getMultiCurrencyWalletCurrenciesSync(userWalletId)
|
||||
.find {
|
||||
it is CryptoCurrency.Token && it.contractAddress.equals(feePaidToken.contractAddress, ignoreCase = true)
|
||||
it is CryptoCurrency.Token &&
|
||||
it.contractAddress.equals(feePaidToken.contractAddress, ignoreCase = true) &&
|
||||
it.network.derivationPath == tokenStatus.currency.network.derivationPath
|
||||
}
|
||||
return if (token != null) {
|
||||
CryptoCurrencyWarning.CustomTokenNotEnoughForFee(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue