Updated on 2026-08-14
This commit is contained in:
parent
33b7a53905
commit
c5560c3c6a
101 changed files with 274 additions and 272 deletions
|
|
@ -354,7 +354,7 @@ internal class DefaultCurrenciesRepository(
|
|||
"Unable to find tokens response for user wallet with provided ID: $userWalletId"
|
||||
},
|
||||
)
|
||||
val blockchain = Blockchain.fromId(networkId.value)
|
||||
val blockchain = Blockchain.fromId(networkId.rawId.value)
|
||||
val blockchainNetworkId = blockchain.toNetworkId()
|
||||
val coinId = blockchain.toCoinId()
|
||||
|
||||
|
|
@ -407,7 +407,7 @@ internal class DefaultCurrenciesRepository(
|
|||
cryptoCurrencyStatus: CryptoCurrencyStatus,
|
||||
coinStatus: CryptoCurrencyStatus?,
|
||||
): Boolean {
|
||||
val blockchain = Blockchain.fromId(cryptoCurrencyStatus.currency.network.id.value)
|
||||
val blockchain = Blockchain.fromId(cryptoCurrencyStatus.currency.network.rawId)
|
||||
val isBitcoinBlockchain = blockchain == Blockchain.Bitcoin || blockchain == Blockchain.BitcoinTestnet
|
||||
return when {
|
||||
cryptoCurrencyStatus.currency is CryptoCurrency.Coin && isBitcoinBlockchain -> {
|
||||
|
|
@ -422,7 +422,7 @@ internal class DefaultCurrenciesRepository(
|
|||
|
||||
override suspend fun getFeePaidCurrency(userWalletId: UserWalletId, network: Network): FeePaidCurrency {
|
||||
return withContext(dispatchers.io) {
|
||||
val blockchain = Blockchain.fromId(network.id.value)
|
||||
val blockchain = Blockchain.fromId(network.rawId)
|
||||
when (val feePaidCurrency = blockchain.feePaidCurrency()) {
|
||||
FeePaidSdkCurrency.Coin -> FeePaidCurrency.Coin
|
||||
FeePaidSdkCurrency.SameCurrency -> FeePaidCurrency.SameCurrency
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ internal class DefaultCurrencyChecksRepository(
|
|||
val balanceValue = currencyStatus.value as? CryptoCurrencyStatus.Loaded ?: return null
|
||||
val stakingBalance = balanceValue.yieldBalance as? YieldBalance.Data
|
||||
val stakingTotalBalance = stakingBalance?.getTotalStakingBalance(
|
||||
blockchainId = currencyStatus.currency.network.id.value,
|
||||
blockchainId = currencyStatus.currency.network.rawId,
|
||||
).orZero()
|
||||
return when {
|
||||
balanceValue.amount.isZero() && stakingTotalBalance.isZero() -> null
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ internal class DefaultPolkadotAccountHealthCheckRepository(
|
|||
|
||||
override suspend fun runCheck(userWalletId: UserWalletId, network: Network) {
|
||||
// Run Polkadot account health check
|
||||
if (Blockchain.fromId(network.id.value) != Blockchain.Polkadot) return
|
||||
if (Blockchain.fromId(network.rawId) != Blockchain.Polkadot) return
|
||||
|
||||
val walletManager = walletManagersFacade.getOrCreateWalletManager(userWalletId, network)
|
||||
val address = requireNotNull(walletManager?.wallet?.address) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue