Updated on 2026-08-14
This commit is contained in:
parent
587a0c8624
commit
88cf7ec1af
212 changed files with 1223 additions and 1128 deletions
|
|
@ -48,13 +48,13 @@ class UserWalletManagerImpl(
|
|||
override suspend fun getNativeTokenBalance(networkId: String, derivationPath: String?): ProxyAmount? {
|
||||
val blockchain = requireNotNull(Blockchain.fromNetworkId(networkId)) { "blockchain not found" }
|
||||
val walletManager = getActualWalletManager(blockchain, derivationPath)
|
||||
return walletManager.wallet.amounts.firstNotNullOfOrNull {
|
||||
it.takeIf { it.key is AmountType.Coin }
|
||||
}?.value?.let {
|
||||
return walletManager.wallet.amounts.firstNotNullOfOrNull { amountEntry ->
|
||||
amountEntry.takeIf { amountEntry.key is AmountType.Coin }
|
||||
}?.value?.let { amount ->
|
||||
ProxyAmount(
|
||||
it.currencySymbol,
|
||||
it.value ?: BigDecimal.ZERO,
|
||||
it.decimals,
|
||||
amount.currencySymbol,
|
||||
amount.value ?: BigDecimal.ZERO,
|
||||
amount.decimals,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue