Updated on 2026-08-14
This commit is contained in:
parent
6693041c3b
commit
56faa03561
4 changed files with 39 additions and 16 deletions
|
|
@ -6,6 +6,7 @@ import androidx.core.content.ContextCompat
|
|||
import com.tangem.TangemSdkError
|
||||
import com.tangem.blockchain.common.*
|
||||
import com.tangem.common.CompletionResult
|
||||
import com.tangem.common.extensions.isZero
|
||||
import com.tangem.tap.*
|
||||
import com.tangem.tap.common.analytics.FirebaseAnalyticsHandler
|
||||
import com.tangem.tap.common.extensions.copyToClipboard
|
||||
|
|
@ -59,6 +60,13 @@ class WalletMiddleware {
|
|||
}
|
||||
}
|
||||
is WalletAction.LoadWallet.Success -> {
|
||||
val coinAmount = action.wallet.amounts[AmountType.Coin]?.value
|
||||
if (coinAmount != null && !coinAmount.isZero()) {
|
||||
if (walletState?.getWalletData(action.wallet.blockchain.currency) == null) {
|
||||
store.dispatch(WalletAction.MultiWallet.AddBlockchain(action.wallet.blockchain))
|
||||
store.dispatch(WalletAction.LoadWallet.Success(action.wallet))
|
||||
}
|
||||
}
|
||||
store.dispatch(WalletAction.Warnings.CheckHashesCount.CheckHashesCountOnline)
|
||||
warningsMiddleware.tryToShowAppRatingWarning(action.wallet)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class OnWalletLoadedReducer {
|
|||
} else {
|
||||
val fiatCurrencySymbol = store.state.globalState.appCurrency
|
||||
val amount = wallet.amounts[AmountType.Coin]?.value
|
||||
if (walletState.getWalletData(wallet.blockchain.currency) == null && amount?.isZero() != false) {
|
||||
if (walletState.getWalletData(wallet.blockchain.currency) == null) {
|
||||
return walletState
|
||||
}
|
||||
if (wallet.blockchain != Blockchain.Ethereum) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue