diff --git a/app/src/main/java/com/tangem/tap/domain/TapWalletManager.kt b/app/src/main/java/com/tangem/tap/domain/TapWalletManager.kt index 1bfa9eee08..3349096d24 100644 --- a/app/src/main/java/com/tangem/tap/domain/TapWalletManager.kt +++ b/app/src/main/java/com/tangem/tap/domain/TapWalletManager.kt @@ -34,17 +34,17 @@ class TapWalletManager { store.state.globalState.configManager?.config?.blockchainSdkConfig ?: BlockchainSdkConfig() } - private val walletManagersThrottler = ThrottlerWithValues>(10000) + private val walletManagersThrottler = ThrottlerWithValues>(10000) suspend fun loadWalletData(walletManager: WalletManager) { val blockchain = walletManager.wallet.blockchain val blockchainNetwork = BlockchainNetwork.fromWalletManager(walletManager) - val result = if (walletManagersThrottler.isStillThrottled(blockchain)) { - walletManagersThrottler.geValue(blockchain)!! + val result = if (walletManagersThrottler.isStillThrottled(blockchainNetwork)) { + walletManagersThrottler.geValue(blockchainNetwork)!! } else { val safeUpdateResult = walletManager.safeUpdate() - walletManagersThrottler.updateThrottlingTo(blockchain) - walletManagersThrottler.setValue(blockchain, safeUpdateResult) + walletManagersThrottler.updateThrottlingTo(blockchainNetwork) + walletManagersThrottler.setValue(blockchainNetwork, safeUpdateResult) safeUpdateResult } when (result) {