@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.esm.js
CHANGED
|
@@ -13,7 +13,7 @@ import { isValidXAddress, isValidClassicAddress } from 'ripple-address-codec';
|
|
|
13
13
|
import { getAssociatedTokenAddress, createAssociatedTokenAccountInstruction, createTransferInstruction } from '@solana/spl-token';
|
|
14
14
|
import { StandardWalletAdapter } from '@solana/wallet-standard-wallet-adapter-base';
|
|
15
15
|
import { PublicKey, VersionedTransaction, Transaction, SystemProgram, Connection } from '@solana/web3.js';
|
|
16
|
-
import { XBULL_ID, HOTWALLET_ID, HANA_ID, LOBSTR_ID, FREIGHTER_ID, RABET_ID, ALBEDO_ID } from '@creit.tech/stellar-wallets-kit';
|
|
16
|
+
import { XBULL_ID, HOTWALLET_ID, HANA_ID, LOBSTR_ID, FREIGHTER_ID, RABET_ID, ALBEDO_ID, allowAllModules } from '@creit.tech/stellar-wallets-kit';
|
|
17
17
|
import { Networks, StrKey, nativeToScVal, Address, rpc, TransactionBuilder, BASE_FEE, Contract, TimeoutInfinite, scValToNative, Operation, Transaction as Transaction$1, xdr } from '@stellar/stellar-sdk';
|
|
18
18
|
import { SUI_TESTNET_CHAIN, SUI_MAINNET_CHAIN } from '@mysten/wallet-standard';
|
|
19
19
|
import { CloudflareProvider, JsonRpcProvider, ethers, Interface, Contract as Contract$1, BrowserProvider, JsonRpcSigner, isError } from 'ethers';
|
|
@@ -26,7 +26,6 @@ import { persist } from 'zustand/middleware';
|
|
|
26
26
|
import { useAccount, useConnectors, useConnect, useDisconnect, useSwitchChain, useBalance, useReadContract, createConfig, http, useWalletClient, usePublicClient, WagmiProvider } from 'wagmi';
|
|
27
27
|
import SafeAppsSDK, { TransactionStatus as TransactionStatus$1 } from '@safe-global/safe-apps-sdk';
|
|
28
28
|
import { getWallets } from '@wallet-standard/core';
|
|
29
|
-
import { allowAllModules } from '@creit.tech/stellar-wallets-kit/utils';
|
|
30
29
|
import { SlushWallet } from '@mysten/slush-wallet';
|
|
31
30
|
import { StargateClient, SigningStargateClient } from '@cosmjs/stargate';
|
|
32
31
|
import { SuiClient } from '@mysten/sui/client';
|
|
@@ -27509,7 +27508,7 @@ const filterViewableTokens = (tokens, config, direction) => {
|
|
|
27509
27508
|
};
|
|
27510
27509
|
const getSecretNetworkBalances = async (chainData, cosmosAddress, squidTokens, keplrTypeWallet) => {
|
|
27511
27510
|
const squidSecretTokens = squidTokens.filter((t) => t.chainId === CHAIN_IDS.SECRET);
|
|
27512
|
-
const { fetchAllSecretBalances } = await import('./secretService-
|
|
27511
|
+
const { fetchAllSecretBalances } = await import('./secretService-CRjW1u6W.js');
|
|
27513
27512
|
return fetchAllSecretBalances(chainData, cosmosAddress, squidSecretTokens, keplrTypeWallet);
|
|
27514
27513
|
};
|
|
27515
27514
|
function getTokenAssetsKey(token) {
|
|
@@ -30661,17 +30660,26 @@ function useStellarWallets() {
|
|
|
30661
30660
|
const [wallets, setWallets] = useState([]);
|
|
30662
30661
|
useEffect(() => {
|
|
30663
30662
|
const initializeWallets = async () => {
|
|
30664
|
-
|
|
30665
|
-
|
|
30666
|
-
|
|
30667
|
-
|
|
30668
|
-
|
|
30669
|
-
|
|
30670
|
-
|
|
30671
|
-
|
|
30672
|
-
|
|
30673
|
-
|
|
30674
|
-
|
|
30663
|
+
// Only run on client side to avoid SSR issues
|
|
30664
|
+
if (typeof window === 'undefined')
|
|
30665
|
+
return;
|
|
30666
|
+
try {
|
|
30667
|
+
const modules = allowAllModules();
|
|
30668
|
+
const promises = modules.map(async (module) => {
|
|
30669
|
+
const isAvailable = await module.isAvailable();
|
|
30670
|
+
return {
|
|
30671
|
+
module,
|
|
30672
|
+
isAvailable,
|
|
30673
|
+
};
|
|
30674
|
+
});
|
|
30675
|
+
const results = await Promise.all(promises);
|
|
30676
|
+
const formattedWallets = results.map((result) => formatStellarWallet(result.module, result.isAvailable));
|
|
30677
|
+
setWallets(formattedWallets);
|
|
30678
|
+
}
|
|
30679
|
+
catch (error) {
|
|
30680
|
+
console.error('Failed to initialize stellar wallets:', error);
|
|
30681
|
+
setWallets([]);
|
|
30682
|
+
}
|
|
30675
30683
|
};
|
|
30676
30684
|
initializeWallets();
|
|
30677
30685
|
}, []);
|