Updated on 2026-08-14

This commit is contained in:
Tangem 2026-06-05 12:35:03 +05:00
parent c637c9a194
commit 0b3914cf6a
29 changed files with 453 additions and 37 deletions

View file

@ -110,6 +110,8 @@ internal class InitialCurrenciesResolver @Inject constructor(
val currencyStatuses = when (accountStatus) {
is AccountStatus.CryptoPortfolio -> accountStatus.flattenCurrencies()
is AccountStatus.Payment -> getPaymentAccountCurrencies(accountStatus)
// Virtual account isn't a swap source in the MVP (withdrawal reuses the send flow)
is AccountStatus.Virtual -> emptyList()
}
val availabilityStates = rampStateManager.availableForSwap(
userWalletId,

View file

@ -1571,6 +1571,8 @@ internal class SwapModel @Inject constructor(
userWalletId = swapCurrencyStatus.userWalletId,
cryptoCurrency = swapCurrency,
).map { (_, status) -> status }
// Virtual account isn't a swap source in the MVP (withdrawal reuses the send flow)
is Account.Virtual -> emptyFlow()
}.distinctUntilChanged { old, new -> old.value.amount == new.value.amount } // Check only balance changes
.onEach { currencyStatus ->

View file

@ -1265,6 +1265,7 @@ internal class StateBuilder(
return when (this) {
is Account.CryptoPortfolio -> CryptoPortfolioIconConverter.convert(icon)
is Account.Payment -> AccountIconUM.Payment
is Account.Virtual -> AccountIconUM.Virtual
}
}

View file

@ -208,6 +208,7 @@ internal class SwapTransferStateBuilder @Inject constructor(
return when (this) {
is Account.CryptoPortfolio -> CryptoPortfolioIconConverter.convert(icon)
is Account.Payment -> AccountIconUM.Payment
is Account.Virtual -> AccountIconUM.Virtual
}
}