@rango-dev/widget-embedded 0.39.1-next.11 → 0.39.1-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -480,6 +480,26 @@ export const createWalletsSlice: StateCreator<
|
|
|
480
480
|
return;
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
+
// Remove old balances for current wallet and blockchain
|
|
484
|
+
get().removeBalancesForWallet(walletType, {
|
|
485
|
+
chains: [wallet.blockChain],
|
|
486
|
+
});
|
|
487
|
+
|
|
488
|
+
/*
|
|
489
|
+
* Check if after fetching balance for an account, the account still exists.
|
|
490
|
+
* (It might get disconnected while fetching balances is pending)
|
|
491
|
+
*/
|
|
492
|
+
if (
|
|
493
|
+
!get().connectedWallets.find(
|
|
494
|
+
(connectedWallet) =>
|
|
495
|
+
connectedWallet.walletType === walletType &&
|
|
496
|
+
connectedWallet.address === wallet.address &&
|
|
497
|
+
connectedWallet.chain === wallet.blockChain
|
|
498
|
+
)
|
|
499
|
+
) {
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
502
|
+
|
|
483
503
|
const balancesForWallet = createBalanceStateForNewAccount(wallet, get);
|
|
484
504
|
|
|
485
505
|
nextAggregatedBalances = updateAggregatedBalanceStateForNewAccount(
|