@0xsquid/react-hooks 8.0.0-beta.5 → 8.0.0-beta.7
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 +22 -14
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +21 -13
- package/dist/index.js.map +1 -1
- package/dist/{secretService-CzcOJdO8.js → secretService-CRjW1u6W.js} +1 -2
- package/dist/{secretService-CzcOJdO8.js.map → secretService-CRjW1u6W.js.map} +1 -1
- package/dist/{secretService-D-DmPKOa.js → secretService-Dzk7YBr5.js} +1 -2
- package/dist/{secretService-D-DmPKOa.js.map → secretService-Dzk7YBr5.js.map} +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -27,7 +27,6 @@ var middleware = require('zustand/middleware');
|
|
|
27
27
|
var wagmi = require('wagmi');
|
|
28
28
|
var SafeAppsSDK = require('@safe-global/safe-apps-sdk');
|
|
29
29
|
var core$1 = require('@wallet-standard/core');
|
|
30
|
-
var utils$o = require('@creit.tech/stellar-wallets-kit/utils');
|
|
31
30
|
var slushWallet = require('@mysten/slush-wallet');
|
|
32
31
|
var stargate = require('@cosmjs/stargate');
|
|
33
32
|
var client = require('@mysten/sui/client');
|
|
@@ -27530,7 +27529,7 @@ const filterViewableTokens = (tokens, config, direction) => {
|
|
|
27530
27529
|
};
|
|
27531
27530
|
const getSecretNetworkBalances = async (chainData, cosmosAddress, squidTokens, keplrTypeWallet) => {
|
|
27532
27531
|
const squidSecretTokens = squidTokens.filter((t) => t.chainId === CHAIN_IDS.SECRET);
|
|
27533
|
-
const { fetchAllSecretBalances } = await Promise.resolve().then(function () { return require('./secretService-
|
|
27532
|
+
const { fetchAllSecretBalances } = await Promise.resolve().then(function () { return require('./secretService-Dzk7YBr5.js'); });
|
|
27534
27533
|
return fetchAllSecretBalances(chainData, cosmosAddress, squidSecretTokens, keplrTypeWallet);
|
|
27535
27534
|
};
|
|
27536
27535
|
function getTokenAssetsKey(token) {
|
|
@@ -30682,17 +30681,26 @@ function useStellarWallets() {
|
|
|
30682
30681
|
const [wallets, setWallets] = React.useState([]);
|
|
30683
30682
|
React.useEffect(() => {
|
|
30684
30683
|
const initializeWallets = async () => {
|
|
30685
|
-
|
|
30686
|
-
|
|
30687
|
-
|
|
30688
|
-
|
|
30689
|
-
|
|
30690
|
-
|
|
30691
|
-
|
|
30692
|
-
|
|
30693
|
-
|
|
30694
|
-
|
|
30695
|
-
|
|
30684
|
+
// Only run on client side to avoid SSR issues
|
|
30685
|
+
if (typeof window === 'undefined')
|
|
30686
|
+
return;
|
|
30687
|
+
try {
|
|
30688
|
+
const modules = stellarWalletsKit.allowAllModules();
|
|
30689
|
+
const promises = modules.map(async (module) => {
|
|
30690
|
+
const isAvailable = await module.isAvailable();
|
|
30691
|
+
return {
|
|
30692
|
+
module,
|
|
30693
|
+
isAvailable,
|
|
30694
|
+
};
|
|
30695
|
+
});
|
|
30696
|
+
const results = await Promise.all(promises);
|
|
30697
|
+
const formattedWallets = results.map((result) => formatStellarWallet(result.module, result.isAvailable));
|
|
30698
|
+
setWallets(formattedWallets);
|
|
30699
|
+
}
|
|
30700
|
+
catch (error) {
|
|
30701
|
+
console.error('Failed to initialize stellar wallets:', error);
|
|
30702
|
+
setWallets([]);
|
|
30703
|
+
}
|
|
30696
30704
|
};
|
|
30697
30705
|
initializeWallets();
|
|
30698
30706
|
}, []);
|