tiwiflix-wallet-connector 1.5.2 → 1.5.4

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/dist/index.esm.js CHANGED
@@ -8355,19 +8355,16 @@ const ConnectButton = ({ connector, onConnect, onDisconnect, onError, className,
8355
8355
  useEffect(() => {
8356
8356
  if (account && fetchBalance) {
8357
8357
  setBalanceLoading(true);
8358
- loadBalance().then((hasRealBalance) => {
8359
- setBalanceLoading(false);
8360
- // For TON wallets, always stop initializing after balance fetch completes (even if balance is 0)
8361
- // For other chains, only stop if we got a real balance
8362
- if (account.chainType === 'ton' || hasRealBalance) {
8363
- setIsInitializing(false);
8364
- }
8365
- }).catch(() => {
8358
+ loadBalance()
8359
+ .then(() => {
8360
+ // Always stop initializing once balance request completes
8361
+ })
8362
+ .catch(() => {
8363
+ // Ignore errors, we still clear loading states
8364
+ })
8365
+ .finally(() => {
8366
8366
  setBalanceLoading(false);
8367
- // Always stop initializing on error for TON
8368
- if (account.chainType === 'ton') {
8369
- setIsInitializing(false);
8370
- }
8367
+ setIsInitializing(false);
8371
8368
  });
8372
8369
  }
8373
8370
  else if (account && !fetchBalance) {
package/dist/index.js CHANGED
@@ -8357,19 +8357,16 @@ const ConnectButton = ({ connector, onConnect, onDisconnect, onError, className,
8357
8357
  React.useEffect(() => {
8358
8358
  if (account && fetchBalance) {
8359
8359
  setBalanceLoading(true);
8360
- loadBalance().then((hasRealBalance) => {
8361
- setBalanceLoading(false);
8362
- // For TON wallets, always stop initializing after balance fetch completes (even if balance is 0)
8363
- // For other chains, only stop if we got a real balance
8364
- if (account.chainType === 'ton' || hasRealBalance) {
8365
- setIsInitializing(false);
8366
- }
8367
- }).catch(() => {
8360
+ loadBalance()
8361
+ .then(() => {
8362
+ // Always stop initializing once balance request completes
8363
+ })
8364
+ .catch(() => {
8365
+ // Ignore errors, we still clear loading states
8366
+ })
8367
+ .finally(() => {
8368
8368
  setBalanceLoading(false);
8369
- // Always stop initializing on error for TON
8370
- if (account.chainType === 'ton') {
8371
- setIsInitializing(false);
8372
- }
8369
+ setIsInitializing(false);
8373
8370
  });
8374
8371
  }
8375
8372
  else if (account && !fetchBalance) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiwiflix-wallet-connector",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "description": "Multi-chain wallet connector for Tiwiflix supporting EVM, TON, Solana, and Tron wallets",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",