Updated on 2026-08-14

This commit is contained in:
Tangem 2023-10-26 12:28:34 +05:00
parent bb37d3df75
commit 8f77d699ed

View file

@ -35,6 +35,7 @@ import java.math.BigDecimal
// FIXME: Move to its own module and make internal
@Deprecated("Inject the WalletManagerFacade interface using DI instead")
@Suppress("LargeClass")
class DefaultWalletManagersFacade(
private val walletManagersStore: WalletManagersStore,
private val userWalletsStore: UserWalletsStore,
@ -333,7 +334,11 @@ class DefaultWalletManagersFacade(
is Result.Success -> {
val balance = manager.wallet.fundsAvailable(AmountType.Coin)
val outgoingTxs = manager.wallet.recentTransactions
.filter { it.sourceAddress == manager.wallet.address && it.amount.type == AmountType.Coin }
.filter {
it.sourceAddress == manager.wallet.address &&
it.amount.type == AmountType.Coin &&
it.status != TransactionStatus.Confirmed
}
val rentExempt = result.data
val setRent = if (outgoingTxs.isEmpty()) {