Updated on 2026-08-14
This commit is contained in:
parent
c637c9a194
commit
0b3914cf6a
29 changed files with 453 additions and 37 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 ->
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue