@zubari/sdk 0.1.8 → 0.1.9

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.js CHANGED
@@ -3052,6 +3052,12 @@ function useWalletManager(options = {}) {
3052
3052
  manager.deriveAllAddresses();
3053
3053
  }
3054
3054
  updateState();
3055
+ try {
3056
+ const balances = await manager.fetchAllBalances();
3057
+ setChainBalances(balances);
3058
+ } catch (err) {
3059
+ console.warn("Failed to fetch balances after create:", err);
3060
+ }
3055
3061
  return result;
3056
3062
  } catch (err) {
3057
3063
  const message = err instanceof Error ? err.message : "Failed to create wallet";
@@ -3076,6 +3082,12 @@ function useWalletManager(options = {}) {
3076
3082
  manager.deriveAllAddresses();
3077
3083
  }
3078
3084
  updateState();
3085
+ try {
3086
+ const balances = await manager.fetchAllBalances();
3087
+ setChainBalances(balances);
3088
+ } catch (err) {
3089
+ console.warn("Failed to fetch balances after import:", err);
3090
+ }
3079
3091
  } catch (err) {
3080
3092
  const message = err instanceof Error ? err.message : "Failed to import wallet";
3081
3093
  setError(message);
@@ -3099,6 +3111,12 @@ function useWalletManager(options = {}) {
3099
3111
  manager.deriveAllAddresses();
3100
3112
  }
3101
3113
  updateState();
3114
+ try {
3115
+ const balances = await manager.fetchAllBalances();
3116
+ setChainBalances(balances);
3117
+ } catch (err) {
3118
+ console.warn("Failed to fetch balances after unlock:", err);
3119
+ }
3102
3120
  } catch (err) {
3103
3121
  const message = err instanceof Error ? err.message : "Invalid password";
3104
3122
  setError(message);