@0xsquid/react-hooks 8.7.2-beta-interactive-to-amount.0 → 8.7.2-beta-fav-chains.0
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/core/queries/queries-keys.d.ts +1 -1
- package/dist/core/types/config.d.ts +1 -1
- package/dist/core/types/event.d.ts +2 -1
- package/dist/core/types/route.d.ts +4 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/store/useFavoriteChainsStore.d.ts +20 -0
- package/dist/hooks/store/useSquidStore.d.ts +1 -2
- package/dist/hooks/swap/useSwap.d.ts +2 -4
- package/dist/hooks/transaction/useGetRoute.d.ts +8 -8
- package/dist/{index-uUESkMSI.js → index-0fyTkU8o.js} +62 -63
- package/dist/index-0fyTkU8o.js.map +1 -0
- package/dist/{index-6eFn7nS3.js → index-DYs5b-an.js} +62 -63
- package/dist/index-DYs5b-an.js.map +1 -0
- package/dist/{index.es-CRHo3jIu.js → index.es-Bxk-BRsk.js} +2 -2
- package/dist/{index.es-CRHo3jIu.js.map → index.es-Bxk-BRsk.js.map} +1 -1
- package/dist/{index.es-C0R5BhSh.js → index.es-X0Xkh3ET.js} +2 -2
- package/dist/{index.es-C0R5BhSh.js.map → index.es-X0Xkh3ET.js.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +2 -2
- package/dist/{secretService-C8LsM_VG.js → secretService-BExN6uOo.js} +2 -2
- package/dist/{secretService-C8LsM_VG.js.map → secretService-BExN6uOo.js.map} +1 -1
- package/dist/{secretService-B87PUWJl.js → secretService-CJJobQlZ.js} +2 -2
- package/dist/{secretService-B87PUWJl.js.map → secretService-CJJobQlZ.js.map} +1 -1
- package/dist/services/internal/eventService.d.ts +2 -1
- package/dist/services/internal/numberService.d.ts +0 -1
- package/dist/{stellarService.client-DidQHS07.js → stellarService.client-eIqTLitu.js} +3 -3
- package/dist/{stellarService.client-DidQHS07.js.map → stellarService.client-eIqTLitu.js.map} +1 -1
- package/dist/{stellarService.client-BFgOtfFI.js → stellarService.client-yODv6HFL.js} +3 -3
- package/dist/{stellarService.client-BFgOtfFI.js.map → stellarService.client-yODv6HFL.js.map} +1 -1
- package/package.json +3 -3
- package/dist/index-6eFn7nS3.js.map +0 -1
- package/dist/index-uUESkMSI.js.map +0 -1
|
@@ -3950,9 +3950,6 @@ const getNumericValue = ({ value, precision, useComaEvery3Digits = true, hideIfZ
|
|
|
3950
3950
|
const finalValue = `${isNegative ? "-" : ""}${prefix}${formattedIfVerySmall}${suffix ? ` ${suffix}` : ""}`;
|
|
3951
3951
|
return wrapInParens ? `(${finalValue})` : finalValue;
|
|
3952
3952
|
};
|
|
3953
|
-
function isZeroAmount(amount) {
|
|
3954
|
-
return !amount || amount === "0";
|
|
3955
|
-
}
|
|
3956
3953
|
|
|
3957
3954
|
/**
|
|
3958
3955
|
* Creates a hash string from quote request parameters to track changes
|
|
@@ -22395,15 +22392,14 @@ const keys = () => ({
|
|
|
22395
22392
|
// ============
|
|
22396
22393
|
// Transactions
|
|
22397
22394
|
// ============
|
|
22398
|
-
transaction: (fromChainId, toChainId, toTokenAddress, fromTokenAddress,
|
|
22395
|
+
transaction: (fromChainId, toChainId, toTokenAddress, fromTokenAddress, price, slippage, sourceUserAddress, degenMode, destinationAddress, fallbackAddress, quoteOnly, fromChainType, preHook, postHook, overrideGasRefundAddress) => [
|
|
22399
22396
|
...keys().transactions(),
|
|
22400
22397
|
QueryKeys.Transaction,
|
|
22401
22398
|
fromChainId,
|
|
22402
22399
|
toChainId,
|
|
22403
22400
|
toTokenAddress,
|
|
22404
22401
|
fromTokenAddress,
|
|
22405
|
-
|
|
22406
|
-
toAmount,
|
|
22402
|
+
price,
|
|
22407
22403
|
slippage,
|
|
22408
22404
|
sourceUserAddress,
|
|
22409
22405
|
degenMode,
|
|
@@ -23298,7 +23294,7 @@ const filterViewableTokens = (tokens, config, direction) => {
|
|
|
23298
23294
|
};
|
|
23299
23295
|
const getSecretNetworkBalances = async (chainData, cosmosAddress, squidTokens, keplrTypeWallet) => {
|
|
23300
23296
|
const squidSecretTokens = squidTokens.filter((t) => t.chainId === CHAIN_IDS.SECRET);
|
|
23301
|
-
const { fetchAllSecretBalances } = await import('./secretService-
|
|
23297
|
+
const { fetchAllSecretBalances } = await import('./secretService-CJJobQlZ.js');
|
|
23302
23298
|
return fetchAllSecretBalances(chainData, cosmosAddress, squidSecretTokens, keplrTypeWallet);
|
|
23303
23299
|
};
|
|
23304
23300
|
function getTokenAssetsKey(token) {
|
|
@@ -25155,7 +25151,10 @@ const useConfigStore = create(() => ({
|
|
|
25155
25151
|
isInitialized: false,
|
|
25156
25152
|
}));
|
|
25157
25153
|
const useTransactionStore = create((set, get) => ({
|
|
25154
|
+
fromPrice: undefined,
|
|
25155
|
+
txLocalId: undefined,
|
|
25158
25156
|
transactions: {},
|
|
25157
|
+
currentTransaction: undefined,
|
|
25159
25158
|
setTransactionState(txId, tx) {
|
|
25160
25159
|
if (!txId)
|
|
25161
25160
|
return;
|
|
@@ -26692,8 +26691,8 @@ function useStellarWallets() {
|
|
|
26692
26691
|
return;
|
|
26693
26692
|
try {
|
|
26694
26693
|
const { allowAllModules: initializeAllModules } = await import('@creit.tech/stellar-wallets-kit');
|
|
26695
|
-
const { LedgerModule } = await import('@creit.tech/stellar-wallets-kit/modules/ledger.module');
|
|
26696
|
-
const { formatStellarWallet } = await import('./stellarService.client-
|
|
26694
|
+
const { LedgerModule } = await import('@creit.tech/stellar-wallets-kit/modules/ledger.module.mjs');
|
|
26695
|
+
const { formatStellarWallet } = await import('./stellarService.client-eIqTLitu.js');
|
|
26697
26696
|
const modules = [...initializeAllModules(), new LedgerModule()];
|
|
26698
26697
|
const promises = modules.map(async (module) => {
|
|
26699
26698
|
const isAvailable = await module.isAvailable();
|
|
@@ -27592,8 +27591,7 @@ const useMultiChainWallet = (chain) => {
|
|
|
27592
27591
|
|
|
27593
27592
|
const useSwap = () => {
|
|
27594
27593
|
const { initialAssets, defaultTokensPerChain, disabledChains, availableChains, } = useConfigStore((state) => state.config);
|
|
27595
|
-
const
|
|
27596
|
-
const toAmount = useTransactionStore((state) => state.toAmount);
|
|
27594
|
+
const fromPrice = useTransactionStore((state) => state.fromPrice);
|
|
27597
27595
|
const { swapRoute } = useSwapRoutePersistStore();
|
|
27598
27596
|
const { tokens } = useSquidTokens();
|
|
27599
27597
|
const queryClient = useQueryClient();
|
|
@@ -27645,17 +27643,8 @@ const useSwap = () => {
|
|
|
27645
27643
|
}),
|
|
27646
27644
|
};
|
|
27647
27645
|
}, [destAddressData, destAddressEnsData.data, toChain?.chainType]);
|
|
27648
|
-
const
|
|
27649
|
-
useTransactionStore.setState({
|
|
27650
|
-
fromAmount: amount || undefined,
|
|
27651
|
-
toAmount: undefined,
|
|
27652
|
-
});
|
|
27653
|
-
}, []);
|
|
27654
|
-
const toAmountChanged = useCallback((amount) => {
|
|
27655
|
-
useTransactionStore.setState({
|
|
27656
|
-
toAmount: amount || undefined,
|
|
27657
|
-
fromAmount: undefined,
|
|
27658
|
-
});
|
|
27646
|
+
const fromPriceChanged = useCallback((price) => {
|
|
27647
|
+
useTransactionStore.setState({ fromPrice: price || undefined });
|
|
27659
27648
|
}, []);
|
|
27660
27649
|
/**
|
|
27661
27650
|
* When user changes something from the SwapView
|
|
@@ -27815,10 +27804,8 @@ const useSwap = () => {
|
|
|
27815
27804
|
tokenItems,
|
|
27816
27805
|
onSwapChange,
|
|
27817
27806
|
invertSwaps,
|
|
27818
|
-
|
|
27819
|
-
|
|
27820
|
-
fromAmountChanged,
|
|
27821
|
-
toAmountChanged,
|
|
27807
|
+
fromPrice,
|
|
27808
|
+
fromPriceChanged,
|
|
27822
27809
|
toToken,
|
|
27823
27810
|
fromToken,
|
|
27824
27811
|
fromChain,
|
|
@@ -30025,7 +30012,7 @@ function hederaWalletConnect(parameters) {
|
|
|
30025
30012
|
const optionalChains = config.chains.map((x) => x.id);
|
|
30026
30013
|
if (!optionalChains.length)
|
|
30027
30014
|
return;
|
|
30028
|
-
const { EthereumProvider } = await import('./index.es-
|
|
30015
|
+
const { EthereumProvider } = await import('./index.es-Bxk-BRsk.js');
|
|
30029
30016
|
const rawProvider = await EthereumProvider.init({
|
|
30030
30017
|
...restParameters,
|
|
30031
30018
|
disableProviderPing: true,
|
|
@@ -30162,6 +30149,7 @@ const createWagmiConfig = (squidChains, hederaExtensions) => {
|
|
|
30162
30149
|
description: SQUID_METADATA.description,
|
|
30163
30150
|
};
|
|
30164
30151
|
return createConfig({
|
|
30152
|
+
ssr: true,
|
|
30165
30153
|
chains: wagmiChains,
|
|
30166
30154
|
transports: Object.fromEntries(wagmiChains.map((chain) => [
|
|
30167
30155
|
chain.id,
|
|
@@ -30655,6 +30643,32 @@ const useAddressBookStore = create(persist((set) => ({
|
|
|
30655
30643
|
name: "squid.addressbook.store",
|
|
30656
30644
|
}));
|
|
30657
30645
|
|
|
30646
|
+
const useFavoriteChainsStore = create(persist((set, get) => ({
|
|
30647
|
+
favoriteChains: [],
|
|
30648
|
+
addFavoriteChain(chain) {
|
|
30649
|
+
set((state) => ({
|
|
30650
|
+
favoriteChains: [...state.favoriteChains, chain],
|
|
30651
|
+
}));
|
|
30652
|
+
},
|
|
30653
|
+
removeFavoriteChain(chain) {
|
|
30654
|
+
set((state) => ({
|
|
30655
|
+
favoriteChains: state.favoriteChains.filter((c) => c.chainId !== chain.chainId),
|
|
30656
|
+
}));
|
|
30657
|
+
},
|
|
30658
|
+
toggleFavoriteChain(chain) {
|
|
30659
|
+
const isFavorite = get().favoriteChains.some((c) => c.chainId === chain.chainId);
|
|
30660
|
+
if (isFavorite) {
|
|
30661
|
+
get().removeFavoriteChain(chain);
|
|
30662
|
+
}
|
|
30663
|
+
else {
|
|
30664
|
+
get().addFavoriteChain(chain);
|
|
30665
|
+
}
|
|
30666
|
+
},
|
|
30667
|
+
}), {
|
|
30668
|
+
name: "squid.favorite.chains.store",
|
|
30669
|
+
version: 1,
|
|
30670
|
+
}));
|
|
30671
|
+
|
|
30658
30672
|
const useFavoriteTokensStore = create(persist((set, get) => ({
|
|
30659
30673
|
favoriteTokens: [],
|
|
30660
30674
|
addFavoriteToken(token) {
|
|
@@ -32430,7 +32444,7 @@ const useHistory = (txType) => {
|
|
|
32430
32444
|
fromChain: tx.params.fromChain,
|
|
32431
32445
|
fromToken: tx.params.fromToken,
|
|
32432
32446
|
fromAddress: tx.params.fromAddress,
|
|
32433
|
-
fromAmount: tx.params.fromAmount
|
|
32447
|
+
fromAmount: tx.params.fromAmount,
|
|
32434
32448
|
toChain: tx.params.toChain,
|
|
32435
32449
|
toToken: tx.params.toToken,
|
|
32436
32450
|
toAddress: tx.params.toAddress,
|
|
@@ -32671,7 +32685,7 @@ const useApproval = ({ squidRoute, }) => {
|
|
|
32671
32685
|
const publicClient = usePublicClient();
|
|
32672
32686
|
const queryClient = useQueryClient();
|
|
32673
32687
|
const squid = useSquidStore((state) => state.squid);
|
|
32674
|
-
const { fromChain, fromToken,
|
|
32688
|
+
const { fromChain, fromToken, fromPrice, isSameChain } = useSwap();
|
|
32675
32689
|
const { evmSigner } = useSigner({ chain: fromChain });
|
|
32676
32690
|
const { connector: activeConnector } = useAccount();
|
|
32677
32691
|
const { getChainType } = useSquidChains();
|
|
@@ -32844,7 +32858,7 @@ const useApproval = ({ squidRoute, }) => {
|
|
|
32844
32858
|
// This is to ensure we're using the latest expiry timestamp
|
|
32845
32859
|
if (squidRoute) {
|
|
32846
32860
|
queryClient.refetchQueries({
|
|
32847
|
-
queryKey: keys().transaction(squidRoute.params.fromChain, squidRoute.params.toChain, squidRoute.params.toToken, squidRoute.params.fromToken,
|
|
32861
|
+
queryKey: keys().transaction(squidRoute.params.fromChain, squidRoute.params.toChain, squidRoute.params.toToken, squidRoute.params.fromToken, fromPrice, squidRoute.params.slippage, squidRoute.params.fromAddress, squidRoute.params.bypassGuardrails, squidRoute.params.toAddress, squidRoute.params.fallbackAddresses?.[0]?.address, squidRoute.params.quoteOnly, getChainType(squidRoute.params.fromChain), squidRoute.params.preHook, squidRoute.params.postHook,
|
|
32848
32862
|
// TODO: update types
|
|
32849
32863
|
squidRoute.params?.overrideGasRefundAddress),
|
|
32850
32864
|
});
|
|
@@ -32863,7 +32877,7 @@ const AXELAR_PROVIDER_IMAGE_URL = "https://raw.githubusercontent.com/0xsquid/ass
|
|
|
32863
32877
|
const useEstimate = (squidRoute) => {
|
|
32864
32878
|
const collectFees = useConfigStore((state) => state.config.collectFees);
|
|
32865
32879
|
const { tokens } = useSquidTokens();
|
|
32866
|
-
const { fromChain, toChain,
|
|
32880
|
+
const { fromChain, toChain, fromPrice } = useSwap();
|
|
32867
32881
|
const fromToken = useMemo(() => findToken(tokens, squidRoute?.params.fromChain, squidRoute?.params.fromToken), [tokens, squidRoute?.params.fromChain, squidRoute?.params.fromToken]);
|
|
32868
32882
|
const { chainFeeParams, gasToken } = useSourceChainGasToken({
|
|
32869
32883
|
fromChain,
|
|
@@ -32959,9 +32973,9 @@ const useEstimate = (squidRoute) => {
|
|
|
32959
32973
|
const slippageFormatted = Number(squidRoute?.estimate?.aggregateSlippage ?? 0).toFixed(2) + "%";
|
|
32960
32974
|
const fromBalanceEnoughToSwap = useMemo(() => {
|
|
32961
32975
|
const fromBalanceNum = Number(fromBalanceFormatted ?? 0);
|
|
32962
|
-
const
|
|
32963
|
-
return fromBalanceNum >=
|
|
32964
|
-
}, [fromBalanceFormatted,
|
|
32976
|
+
const fromPriceNum = Number(fromPrice ?? 0);
|
|
32977
|
+
return fromBalanceNum >= fromPriceNum;
|
|
32978
|
+
}, [fromBalanceFormatted, fromPrice]);
|
|
32965
32979
|
return {
|
|
32966
32980
|
...estimateResults,
|
|
32967
32981
|
fromBalanceFormatted,
|
|
@@ -36180,12 +36194,8 @@ const useExecuteTransaction = (squidRoute) => {
|
|
|
36180
36194
|
if (!depositData?.depositAddress) {
|
|
36181
36195
|
throw new Error("Deposit address is required");
|
|
36182
36196
|
}
|
|
36183
|
-
const fromAmount = route.params.fromAmount || route.estimate.fromAmount;
|
|
36184
|
-
if (isZeroAmount(fromAmount)) {
|
|
36185
|
-
throw new Error("fromAmount is required for Solana transfer");
|
|
36186
|
-
}
|
|
36187
36197
|
const signature = await executeSolanaTransfer({
|
|
36188
|
-
amount: BigInt(fromAmount),
|
|
36198
|
+
amount: BigInt(route.params.fromAmount),
|
|
36189
36199
|
target: depositData.depositAddress,
|
|
36190
36200
|
signer: solanaSigner,
|
|
36191
36201
|
connection: solanaConnection,
|
|
@@ -36695,12 +36705,8 @@ const useGetRoute = () => {
|
|
|
36695
36705
|
* These data will be used to trigger the transaction
|
|
36696
36706
|
* @returns {Route} Route data
|
|
36697
36707
|
*/
|
|
36698
|
-
return useMutation(async ({ fromChain, toChain, fromToken, toToken, sourceUserAddress, destinationAddress, fromPrice
|
|
36699
|
-
if (!fromChain ||
|
|
36700
|
-
!toChain ||
|
|
36701
|
-
!fromToken ||
|
|
36702
|
-
!toToken ||
|
|
36703
|
-
(!fromPrice && !toPrice)) {
|
|
36708
|
+
return useMutation(async ({ fromChain, toChain, fromToken, toToken, sourceUserAddress, destinationAddress, fromPrice, bypassGuardrails, quoteOnly, fromChainType, postHook, preHook, overrideGasRefundAddress, }) => {
|
|
36709
|
+
if (!fromChain || !toChain || !fromToken || !toToken || !fromPrice) {
|
|
36704
36710
|
return undefined;
|
|
36705
36711
|
}
|
|
36706
36712
|
// Dispatch requestQuote event
|
|
@@ -36710,7 +36716,6 @@ const useGetRoute = () => {
|
|
|
36710
36716
|
fromToken: fromToken.address,
|
|
36711
36717
|
toToken: toToken.address,
|
|
36712
36718
|
fromAmount: fromPrice,
|
|
36713
|
-
toAmount: toPrice,
|
|
36714
36719
|
fromAddress: sourceUserAddress,
|
|
36715
36720
|
toAddress: destinationAddress,
|
|
36716
36721
|
});
|
|
@@ -36719,13 +36724,13 @@ const useGetRoute = () => {
|
|
|
36719
36724
|
const fromTokenAddress = fromToken.address;
|
|
36720
36725
|
const toTokenAddress = toToken.address;
|
|
36721
36726
|
const fromAmount = parseToBigInt(fromPrice?.toString() ?? "0", fromToken?.decimals).toString();
|
|
36722
|
-
const toAmount = parseToBigInt(toPrice?.toString() ?? "0", toToken?.decimals).toString();
|
|
36723
36727
|
const fromAddress = sourceUserAddress ??
|
|
36724
36728
|
chainTypeToZeroAddressMap[fromChainType ?? ChainType.EVM];
|
|
36725
36729
|
const params = {
|
|
36726
36730
|
fromChain,
|
|
36727
36731
|
fromToken: fromTokenAddress,
|
|
36728
36732
|
fromAddress,
|
|
36733
|
+
fromAmount,
|
|
36729
36734
|
toChain,
|
|
36730
36735
|
toToken: toTokenAddress,
|
|
36731
36736
|
toAddress: destinationAddress ?? "",
|
|
@@ -36742,18 +36747,12 @@ const useGetRoute = () => {
|
|
|
36742
36747
|
cosmosFallbackAddresses[0].address) {
|
|
36743
36748
|
params.fallbackAddresses = cosmosFallbackAddresses;
|
|
36744
36749
|
}
|
|
36745
|
-
if (!isZeroAmount(fromAmount)) {
|
|
36746
|
-
params.fromAmount = fromAmount;
|
|
36747
|
-
}
|
|
36748
|
-
else if (!isZeroAmount(toAmount)) {
|
|
36749
|
-
params.toAmount = toAmount;
|
|
36750
|
-
}
|
|
36751
36750
|
const { route } = await squid.getRoute({
|
|
36752
36751
|
...params,
|
|
36753
36752
|
});
|
|
36754
36753
|
// Cache the route data
|
|
36755
36754
|
// Useful when the getRoute mutation is called from another hook
|
|
36756
|
-
queryClient.setQueryData(keys().transaction(fromChain, toChain, toToken.address, fromToken.address, fromPrice,
|
|
36755
|
+
queryClient.setQueryData(keys().transaction(fromChain, toChain, toToken.address, fromToken.address, fromPrice, config.slippage, sourceUserAddress, config.degenMode, destinationAddress, swapRoute?.fallbackAddress, quoteOnly, fromChainType, config.preHook, config.postHook, overrideGasRefundAddress), route);
|
|
36757
36756
|
return route;
|
|
36758
36757
|
});
|
|
36759
36758
|
};
|
|
@@ -36767,7 +36766,7 @@ refetchIntervalInBackground = false, refetchInterval = 30000, quoteOnly = true,
|
|
|
36767
36766
|
const depositRefundAddress = useSwapRoutePersistStore((store) => store.swapRoute?.depositRefundAddress);
|
|
36768
36767
|
const { isAvailableAsPaymentMethod, isEnabled: isDepositAddressEnabled } = useDepositAddress();
|
|
36769
36768
|
const getRouteMutation = useGetRoute();
|
|
36770
|
-
const { fromChain, toChain,
|
|
36769
|
+
const { fromChain, toChain, fromPrice, destinationAddress: { address: destinationAddress } = {}, fromToken, toToken, } = useSwap();
|
|
36771
36770
|
const { connectedAddress: { address: sourceConnectedAddress }, } = useMultiChainWallet(fromChain);
|
|
36772
36771
|
// When the payment method is deposit address, users can specify a refund address on the source chain
|
|
36773
36772
|
// Tokens will be sent to this address in case of swap failure
|
|
@@ -36776,13 +36775,12 @@ refetchIntervalInBackground = false, refetchInterval = 30000, quoteOnly = true,
|
|
|
36776
36775
|
const sourceUserAddress = isDepositAddressEnabled && isAvailableAsPaymentMethod
|
|
36777
36776
|
? depositRefundAddress ?? sourceConnectedAddress
|
|
36778
36777
|
: sourceConnectedAddress;
|
|
36779
|
-
const squidRouteQueryKeys = useMemo(() => keys().transaction(fromChain?.chainId, toChain?.chainId, toToken?.address, fromToken?.address,
|
|
36778
|
+
const squidRouteQueryKeys = useMemo(() => keys().transaction(fromChain?.chainId, toChain?.chainId, toToken?.address, fromToken?.address, fromPrice, config.slippage, sourceUserAddress, config.degenMode, destinationAddress, fallbackAddress, quoteOnly, fromChain?.chainType, config.preHook, config.postHook, config.overrideGasRefundAddress), [
|
|
36780
36779
|
fromChain?.chainId,
|
|
36781
36780
|
toChain?.chainId,
|
|
36782
36781
|
toToken?.address,
|
|
36783
36782
|
fromToken?.address,
|
|
36784
|
-
|
|
36785
|
-
toAmount,
|
|
36783
|
+
fromPrice,
|
|
36786
36784
|
config.slippage,
|
|
36787
36785
|
sourceUserAddress,
|
|
36788
36786
|
config.degenMode,
|
|
@@ -36797,7 +36795,8 @@ refetchIntervalInBackground = false, refetchInterval = 30000, quoteOnly = true,
|
|
|
36797
36795
|
const queryEnabled = enabled != undefined
|
|
36798
36796
|
? enabled
|
|
36799
36797
|
: squid !== undefined &&
|
|
36800
|
-
|
|
36798
|
+
fromPrice !== undefined &&
|
|
36799
|
+
fromPrice !== "0" &&
|
|
36801
36800
|
toChain?.chainId !== undefined &&
|
|
36802
36801
|
toToken?.address !== undefined;
|
|
36803
36802
|
const queryClient = useQueryClient();
|
|
@@ -36815,8 +36814,7 @@ refetchIntervalInBackground = false, refetchInterval = 30000, quoteOnly = true,
|
|
|
36815
36814
|
toToken,
|
|
36816
36815
|
sourceUserAddress,
|
|
36817
36816
|
destinationAddress,
|
|
36818
|
-
fromPrice
|
|
36819
|
-
toPrice: toAmount,
|
|
36817
|
+
fromPrice,
|
|
36820
36818
|
bypassGuardrails: config.degenMode,
|
|
36821
36819
|
quoteOnly,
|
|
36822
36820
|
fromChainType: fromChain?.chainType,
|
|
@@ -37444,6 +37442,7 @@ const SquidProvider = ({ children, config, placeholder, }) => {
|
|
|
37444
37442
|
// Even with an error, we want wagmi to be defined so that we can display the maintenance mode layout
|
|
37445
37443
|
// Create wagmi config with mainnet as fallback in maintenance mode
|
|
37446
37444
|
const newWagmiConfig = createConfig({
|
|
37445
|
+
ssr: true,
|
|
37447
37446
|
chains: [mainnet],
|
|
37448
37447
|
connectors: [injected()],
|
|
37449
37448
|
transports: {
|
|
@@ -37482,5 +37481,5 @@ const SquidProvider = ({ children, config, placeholder, }) => {
|
|
|
37482
37481
|
React.createElement(CosmosProvider, null, children)))))))))) : (placeholder);
|
|
37483
37482
|
};
|
|
37484
37483
|
|
|
37485
|
-
export {
|
|
37486
|
-
//# sourceMappingURL=index-
|
|
37484
|
+
export { useWalletStore as $, AxelarStatusResponseType as A, useHederaTokenAssociations as B, CHAIN_IDS as C, DEFAULT_LOCALE as D, useKeyboardNavigation as E, useSquidQueryClient as F, useSquid as G, HistoryTxType as H, useStellarAccountActivation as I, useStellarTrustLine as J, useAddressBookStore as K, useAssetsColorsStore as L, useFavoriteChainsStore as M, Nr as N, useFavoriteTokensStore as O, useHistoryStore as P, QueryKeys as Q, useSendTransactionStore as R, SquidStatusErrorType as S, TransactionErrorType as T, useConfigStore as U, useSquidStore as V, Wo as W, XamanXrplNetwork as X, useSwapRoutePersistStore as Y, useTransactionStore as Z, ConnectingWalletStatus as _, WindowWalletFlag as a, useRecommendedQuote as a$, useDepositAddress as a0, useSwap as a1, buildUrlSearchParamsFromSwapEvent as a2, parseInitialAssetsFromUrl as a3, useUrlSwapParams as a4, useAllConnectedWalletBalances as a5, useAllTokensWithBalanceForChainType as a6, useCosmosBalance as a7, useEvmBalance as a8, useMultiChainBalance as a9, useSendTransactionStatus as aA, useSwapTransactionStatus as aB, useAvatar as aC, useHistory as aD, useDebouncedValue as aE, useAddToken as aF, useAutoConnect as aG, useEnsDataForAddress as aH, useEnsSearch as aI, useGnosisContext as aJ, useIsSameAddressAndGnosisContext as aK, useIntegratorContext as aL, useMultiChainWallet as aM, useSigner as aN, useWallet as aO, useWallets as aP, useXrplTrustLine as aQ, TX_STATUS_CONSTANTS as aR, FINAL_TRANSACTION_STATUSES as aS, useGetFiatQuote as aT, useGetOnRampConfig as aU, useExecuteFiatQuote as aV, useFiatOnRampTxStatus as aW, useFiatTransactions as aX, useCurrencyDetails as aY, useCountryDetails as aZ, useAvailableQuotes as a_, useMultipleTokenPrices as aa, useBitcoinNativeBalance as ab, useCosmosNativeBalance as ac, useEvmNativeBalance as ad, useNativeBalance as ae, useSolanaNativeBalance as af, useStellarNativeBalance as ag, useSuiNativeBalance as ah, useXrplNativeBalance as ai, useNativeTokenForChain as aj, useSingleTokenPrice as ak, useSourceChainGasToken as al, useSquidTokens as am, useHistoricalData as an, useTokensData as ao, useEstimateSendTransaction as ap, useSendTransaction as aq, useSendTransactionGas as ar, useAllTransactionsStatus as as, useApproval as at, useEstimate as au, useEstimatePriceImpact as av, useExecuteTransaction as aw, useGetRoute as ax, useGetRouteWrapper as ay, useRouteWarnings as az, chainTypeToZeroAddressMap as b, formatEvmWallet as b$, useGetOnrampPaymentTypes as b0, useSuggestedFiatAmounts as b1, SquidProvider as b2, EnsService as b3, getXummClient as b4, isXamanXAppContext as b5, getQueryHeaders as b6, getStatusCode as b7, is404Error as b8, assetsBaseUrl as b9, getFirstAvailableChainId as bA, fetchHighestBalanceToken as bB, getInitialOrDefaultTokenAddressForChain as bC, getInitialTokenAddressForChain as bD, filterTokensForDestination as bE, getInitialChainIdFromConfig as bF, getCosmosKey as bG, getKeysSettled as bH, getAllKeysForSupportedCosmosChains as bI, isCosmosAddressValid as bJ, getCosmosSigningClient as bK, getCosmosChainInfosObject as bL, connectCosmosWallet as bM, isFallbackAddressNeeded as bN, suggestChainOrThrow as bO, normalizeError as bP, transactionErrorCode as bQ, isUserRejectionError as bR, getTransactionError as bS, handleTransactionErrorEvents as bT, isSwapRouteError as bU, isStatusError as bV, createQuoteRequestParamsHash as bW, WidgetEvents as bX, EvmNetworkNotSupportedErrorCode as bY, addEthereumChain as bZ, parseEvmAddress as b_, shareSubgraphId as ba, sortTokensBySharedSubgraphIds as bb, getSupportedChainIdsForDirection as bc, filterChains as bd, filterTokens as be, getTokenImage as bf, getNewSwapParamsFromInput as bg, sortAllTokens as bh, findToken as bi, findNativeToken as bj, normalizeIbcAddress as bk, groupTokensBySymbol as bl, groupTokensByChainId as bm, filterViewableTokens as bn, getSecretNetworkBalances as bo, getTokenAssetsKey as bp, fetchAssetsColors as bq, initializeSquidWithAssetsColors as br, isEmptyObject as bs, normalizeTokenSymbol as bt, areTokenSymbolsCompatible as bu, isEvmosChain as bv, resolveChainIdFromAsset as bw, getConfigWithDefaults as bx, randomIntFromInterval as by, getTokensForChain as bz, chainTypeToNativeTokenAddressMap as c, isHistoryTransactionPending as c$, filterWagmiConnector as c0, waitForReceiptWithRetry as c1, getUserCountry as c2, getCountryData as c3, getCurrencyData as c4, adaptiveRound as c5, getSuggestedAmountsForCurrency as c6, HederaExtensionHelper as c7, convertHederaAccountIdToEvmAddress as c8, convertEvmAddressToHederaAccountId as c9, isValidIssuedAsset as cA, isValidHorizonAsset as cB, formatTransactionHistoryDate as cC, getAxelarExplorerTxUrl as cD, getSourceExplorerTxUrl as cE, getMainExplorerUrl as cF, formatDistance as cG, formatSeconds as cH, formatSwapTxStatusResponseForStorage as cI, simplifyRouteAction as cJ, fetchSwapTransactionStatus as cK, compareTransactionIds as cL, isCoralBridgeAction as cM, sleep as cN, isDepositRoute as cO, isChainflipBridgeTransaction as cP, isOnChainTxData as cQ, getHistoryTransactionId as cR, getStepStatuses as cS, getHalfSuccessState as cT, getStepsInfos as cU, getSwapTxStatusRefetchInterval as cV, getSendTxStatusRefetchInterval as cW, chainflipMultihopBridgeType as cX, getBridgeType as cY, getTransactionStatus as cZ, getTransactionEndStatus as c_, scaleHbarToWei as ca, scaleWeiToHbar as cb, parseToBigInt as cc, roundNumericValue as cd, formatUnitsRounded as ce, formatTokenAmount as cf, formatUsdAmount as cg, trimExtraDecimals as ch, getNumericValue as ci, cleanAmount as cj, convertTokenAmountToUSD as ck, convertUSDToTokenAmount as cl, calculateTotal24hChange as cm, getRouteExpiry as cn, searchTokens as co, filterSolanaWallets as cp, isSolanaAddressValid as cq, executeSolanaSwap as cr, executeSolanaTransfer as cs, isStellarAddressValid as ct, getStellarNetwork as cu, stellarAddressToScVal as cv, getStellarTrustLineAsset as cw, isStellarToken as cx, isStellarIssuedToken as cy, getStellarHorizonApiUrl as cz, definedInWindow as d, isHistoryTransactionFailed as d0, isHistoryTransactionWarning as d1, isHistoryTransactionEnded as d2, formatHash as d3, isWalletAddressValid as d4, redirectToExtensionsStore as d5, accessProperty as d6, populateWallets as d7, getDefaultChain as d8, sortWallets as d9, areSameAddress as da, sortAddressBook as db, calculateTotalUsdBalanceUSD as dc, addTokenToWallet as dd, isEvmChainNotSupportedError as de, getWalletSupportedChainTypes as df, getConnectorForChainType as dg, walletSupportsChainType as dh, connectWallet as di, cancelConnectWallet as dj, isProblematicConnector as dk, mergeWallets as dl, isXionSmartContractAddress as dm, isXrplAddressValid as dn, buildXrplTrustSetTx as dp, getXrplNetwork as dq, parseXrplPaymentTx as dr, parseXrplTokenAddress as ds, er as e, formatBNToReadable as f, DEFAULT_ROUTE_REFETCH_INTERVAL as g, destinationAddressResetValue as h, fallbackAddressResetValue as i, nativeCosmosTokenAddress as j, nativeEvmTokenAddress as k, nativeSolanaTokenAddress as l, nativeStellarTokenAddress as m, nativeBitcoinTokenAddress as n, nativeSuiTokenAddress as o, nativeXrplTokenAddress as p, CosmosProvider as q, SendTransactionStatus as r, TransactionStatus as s, useTrackSearchEmpty as t, useCosmosContext as u, useSquidChains as v, walletIconBaseUrl as w, useClient as x, useCosmosForChain as y, useHederaAccountActivation as z };
|
|
37485
|
+
//# sourceMappingURL=index-DYs5b-an.js.map
|