@0xsquid/react-hooks 8.7.2-beta-interactive-to-amount.1 → 8.7.2
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 -2
- package/dist/core/types/event.d.ts +2 -1
- package/dist/core/types/route.d.ts +4 -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 -9
- package/dist/{index-B9EnYPpR.js → index-D3bbd13Z.js} +36 -69
- package/dist/index-D3bbd13Z.js.map +1 -0
- package/dist/{index-BL3rpZzC.js → index-DaYYG81O.js} +37 -69
- package/dist/index-DaYYG81O.js.map +1 -0
- package/dist/{index.es-Da6lPGPH.js → index.es-Bn83pLT9.js} +2 -2
- package/dist/{index.es-Da6lPGPH.js.map → index.es-Bn83pLT9.js.map} +1 -1
- package/dist/{index.es-C93MXP-M.js → index.es-Ds1lt_e4.js} +2 -2
- package/dist/{index.es-C93MXP-M.js.map → index.es-Ds1lt_e4.js.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/{secretService-Bp_azQsY.js → secretService-CKReaNYo.js} +2 -2
- package/dist/{secretService-Bp_azQsY.js.map → secretService-CKReaNYo.js.map} +1 -1
- package/dist/{secretService-CO9haOur.js → secretService-CM6noWhX.js} +2 -2
- package/dist/{secretService-CO9haOur.js.map → secretService-CM6noWhX.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-CrlGBSG9.js → stellarService.client-0dfuo3PJ.js} +3 -3
- package/dist/{stellarService.client-CrlGBSG9.js.map → stellarService.client-0dfuo3PJ.js.map} +1 -1
- package/dist/{stellarService.client-B-EC09rP.js → stellarService.client-Ko2roGXL.js} +3 -3
- package/dist/{stellarService.client-B-EC09rP.js.map → stellarService.client-Ko2roGXL.js.map} +1 -1
- package/package.json +3 -3
- package/dist/index-B9EnYPpR.js.map +0 -1
- package/dist/index-BL3rpZzC.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,
|
|
@@ -22414,7 +22410,6 @@ const keys = () => ({
|
|
|
22414
22410
|
preHook,
|
|
22415
22411
|
postHook,
|
|
22416
22412
|
overrideGasRefundAddress,
|
|
22417
|
-
prefer,
|
|
22418
22413
|
],
|
|
22419
22414
|
swapTransactionStatus: (transactionId) => [
|
|
22420
22415
|
...keys().transactions(),
|
|
@@ -22606,7 +22601,6 @@ const getConfigWithDefaults = (config) => {
|
|
|
22606
22601
|
preHook: get$2(config, "preHook", defaultConfigValues.preHook),
|
|
22607
22602
|
postHook: get$2(config, "postHook", defaultConfigValues.postHook),
|
|
22608
22603
|
overrideGasRefundAddress: get$2(config, "overrideGasRefundAddress", defaultConfigValues.overrideGasRefundAddress),
|
|
22609
|
-
prefer: get$2(config, "prefer", defaultConfigValues.prefer),
|
|
22610
22604
|
};
|
|
22611
22605
|
};
|
|
22612
22606
|
const randomIntFromInterval = (min, max) => {
|
|
@@ -23300,7 +23294,7 @@ const filterViewableTokens = (tokens, config, direction) => {
|
|
|
23300
23294
|
};
|
|
23301
23295
|
const getSecretNetworkBalances = async (chainData, cosmosAddress, squidTokens, keplrTypeWallet) => {
|
|
23302
23296
|
const squidSecretTokens = squidTokens.filter((t) => t.chainId === CHAIN_IDS.SECRET);
|
|
23303
|
-
const { fetchAllSecretBalances } = await import('./secretService-
|
|
23297
|
+
const { fetchAllSecretBalances } = await import('./secretService-CM6noWhX.js');
|
|
23304
23298
|
return fetchAllSecretBalances(chainData, cosmosAddress, squidSecretTokens, keplrTypeWallet);
|
|
23305
23299
|
};
|
|
23306
23300
|
function getTokenAssetsKey(token) {
|
|
@@ -25157,7 +25151,10 @@ const useConfigStore = create(() => ({
|
|
|
25157
25151
|
isInitialized: false,
|
|
25158
25152
|
}));
|
|
25159
25153
|
const useTransactionStore = create((set, get) => ({
|
|
25154
|
+
fromPrice: undefined,
|
|
25155
|
+
txLocalId: undefined,
|
|
25160
25156
|
transactions: {},
|
|
25157
|
+
currentTransaction: undefined,
|
|
25161
25158
|
setTransactionState(txId, tx) {
|
|
25162
25159
|
if (!txId)
|
|
25163
25160
|
return;
|
|
@@ -26694,8 +26691,8 @@ function useStellarWallets() {
|
|
|
26694
26691
|
return;
|
|
26695
26692
|
try {
|
|
26696
26693
|
const { allowAllModules: initializeAllModules } = await import('@creit.tech/stellar-wallets-kit');
|
|
26697
|
-
const { LedgerModule } = await import('@creit.tech/stellar-wallets-kit/modules/ledger.module');
|
|
26698
|
-
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-Ko2roGXL.js');
|
|
26699
26696
|
const modules = [...initializeAllModules(), new LedgerModule()];
|
|
26700
26697
|
const promises = modules.map(async (module) => {
|
|
26701
26698
|
const isAvailable = await module.isAvailable();
|
|
@@ -27594,8 +27591,7 @@ const useMultiChainWallet = (chain) => {
|
|
|
27594
27591
|
|
|
27595
27592
|
const useSwap = () => {
|
|
27596
27593
|
const { initialAssets, defaultTokensPerChain, disabledChains, availableChains, } = useConfigStore((state) => state.config);
|
|
27597
|
-
const
|
|
27598
|
-
const toAmount = useTransactionStore((state) => state.toAmount);
|
|
27594
|
+
const fromPrice = useTransactionStore((state) => state.fromPrice);
|
|
27599
27595
|
const { swapRoute } = useSwapRoutePersistStore();
|
|
27600
27596
|
const { tokens } = useSquidTokens();
|
|
27601
27597
|
const queryClient = useQueryClient();
|
|
@@ -27647,17 +27643,8 @@ const useSwap = () => {
|
|
|
27647
27643
|
}),
|
|
27648
27644
|
};
|
|
27649
27645
|
}, [destAddressData, destAddressEnsData.data, toChain?.chainType]);
|
|
27650
|
-
const
|
|
27651
|
-
useTransactionStore.setState({
|
|
27652
|
-
fromAmount: amount || undefined,
|
|
27653
|
-
toAmount: undefined,
|
|
27654
|
-
});
|
|
27655
|
-
}, []);
|
|
27656
|
-
const toAmountChanged = useCallback((amount) => {
|
|
27657
|
-
useTransactionStore.setState({
|
|
27658
|
-
toAmount: amount || undefined,
|
|
27659
|
-
fromAmount: undefined,
|
|
27660
|
-
});
|
|
27646
|
+
const fromPriceChanged = useCallback((price) => {
|
|
27647
|
+
useTransactionStore.setState({ fromPrice: price || undefined });
|
|
27661
27648
|
}, []);
|
|
27662
27649
|
/**
|
|
27663
27650
|
* When user changes something from the SwapView
|
|
@@ -27817,10 +27804,8 @@ const useSwap = () => {
|
|
|
27817
27804
|
tokenItems,
|
|
27818
27805
|
onSwapChange,
|
|
27819
27806
|
invertSwaps,
|
|
27820
|
-
|
|
27821
|
-
|
|
27822
|
-
fromAmountChanged,
|
|
27823
|
-
toAmountChanged,
|
|
27807
|
+
fromPrice,
|
|
27808
|
+
fromPriceChanged,
|
|
27824
27809
|
toToken,
|
|
27825
27810
|
fromToken,
|
|
27826
27811
|
fromChain,
|
|
@@ -30027,7 +30012,7 @@ function hederaWalletConnect(parameters) {
|
|
|
30027
30012
|
const optionalChains = config.chains.map((x) => x.id);
|
|
30028
30013
|
if (!optionalChains.length)
|
|
30029
30014
|
return;
|
|
30030
|
-
const { EthereumProvider } = await import('./index.es-
|
|
30015
|
+
const { EthereumProvider } = await import('./index.es-Bn83pLT9.js');
|
|
30031
30016
|
const rawProvider = await EthereumProvider.init({
|
|
30032
30017
|
...restParameters,
|
|
30033
30018
|
disableProviderPing: true,
|
|
@@ -30164,6 +30149,7 @@ const createWagmiConfig = (squidChains, hederaExtensions) => {
|
|
|
30164
30149
|
description: SQUID_METADATA.description,
|
|
30165
30150
|
};
|
|
30166
30151
|
return createConfig({
|
|
30152
|
+
ssr: true,
|
|
30167
30153
|
chains: wagmiChains,
|
|
30168
30154
|
transports: Object.fromEntries(wagmiChains.map((chain) => [
|
|
30169
30155
|
chain.id,
|
|
@@ -32432,7 +32418,7 @@ const useHistory = (txType) => {
|
|
|
32432
32418
|
fromChain: tx.params.fromChain,
|
|
32433
32419
|
fromToken: tx.params.fromToken,
|
|
32434
32420
|
fromAddress: tx.params.fromAddress,
|
|
32435
|
-
fromAmount: tx.params.fromAmount
|
|
32421
|
+
fromAmount: tx.params.fromAmount,
|
|
32436
32422
|
toChain: tx.params.toChain,
|
|
32437
32423
|
toToken: tx.params.toToken,
|
|
32438
32424
|
toAddress: tx.params.toAddress,
|
|
@@ -32673,7 +32659,7 @@ const useApproval = ({ squidRoute, }) => {
|
|
|
32673
32659
|
const publicClient = usePublicClient();
|
|
32674
32660
|
const queryClient = useQueryClient();
|
|
32675
32661
|
const squid = useSquidStore((state) => state.squid);
|
|
32676
|
-
const { fromChain, fromToken,
|
|
32662
|
+
const { fromChain, fromToken, fromPrice, isSameChain } = useSwap();
|
|
32677
32663
|
const { evmSigner } = useSigner({ chain: fromChain });
|
|
32678
32664
|
const { connector: activeConnector } = useAccount();
|
|
32679
32665
|
const { getChainType } = useSquidChains();
|
|
@@ -32846,9 +32832,9 @@ const useApproval = ({ squidRoute, }) => {
|
|
|
32846
32832
|
// This is to ensure we're using the latest expiry timestamp
|
|
32847
32833
|
if (squidRoute) {
|
|
32848
32834
|
queryClient.refetchQueries({
|
|
32849
|
-
queryKey: keys().transaction(squidRoute.params.fromChain, squidRoute.params.toChain, squidRoute.params.toToken, squidRoute.params.fromToken,
|
|
32835
|
+
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,
|
|
32850
32836
|
// TODO: update types
|
|
32851
|
-
squidRoute.params?.overrideGasRefundAddress
|
|
32837
|
+
squidRoute.params?.overrideGasRefundAddress),
|
|
32852
32838
|
});
|
|
32853
32839
|
}
|
|
32854
32840
|
},
|
|
@@ -32865,7 +32851,7 @@ const AXELAR_PROVIDER_IMAGE_URL = "https://raw.githubusercontent.com/0xsquid/ass
|
|
|
32865
32851
|
const useEstimate = (squidRoute) => {
|
|
32866
32852
|
const collectFees = useConfigStore((state) => state.config.collectFees);
|
|
32867
32853
|
const { tokens } = useSquidTokens();
|
|
32868
|
-
const { fromChain, toChain,
|
|
32854
|
+
const { fromChain, toChain, fromPrice } = useSwap();
|
|
32869
32855
|
const fromToken = useMemo(() => findToken(tokens, squidRoute?.params.fromChain, squidRoute?.params.fromToken), [tokens, squidRoute?.params.fromChain, squidRoute?.params.fromToken]);
|
|
32870
32856
|
const { chainFeeParams, gasToken } = useSourceChainGasToken({
|
|
32871
32857
|
fromChain,
|
|
@@ -32961,9 +32947,9 @@ const useEstimate = (squidRoute) => {
|
|
|
32961
32947
|
const slippageFormatted = Number(squidRoute?.estimate?.aggregateSlippage ?? 0).toFixed(2) + "%";
|
|
32962
32948
|
const fromBalanceEnoughToSwap = useMemo(() => {
|
|
32963
32949
|
const fromBalanceNum = Number(fromBalanceFormatted ?? 0);
|
|
32964
|
-
const
|
|
32965
|
-
return fromBalanceNum >=
|
|
32966
|
-
}, [fromBalanceFormatted,
|
|
32950
|
+
const fromPriceNum = Number(fromPrice ?? 0);
|
|
32951
|
+
return fromBalanceNum >= fromPriceNum;
|
|
32952
|
+
}, [fromBalanceFormatted, fromPrice]);
|
|
32967
32953
|
return {
|
|
32968
32954
|
...estimateResults,
|
|
32969
32955
|
fromBalanceFormatted,
|
|
@@ -36182,12 +36168,8 @@ const useExecuteTransaction = (squidRoute) => {
|
|
|
36182
36168
|
if (!depositData?.depositAddress) {
|
|
36183
36169
|
throw new Error("Deposit address is required");
|
|
36184
36170
|
}
|
|
36185
|
-
const fromAmount = route.params.fromAmount || route.estimate.fromAmount;
|
|
36186
|
-
if (isZeroAmount(fromAmount)) {
|
|
36187
|
-
throw new Error("fromAmount is required for Solana transfer");
|
|
36188
|
-
}
|
|
36189
36171
|
const signature = await executeSolanaTransfer({
|
|
36190
|
-
amount: BigInt(fromAmount),
|
|
36172
|
+
amount: BigInt(route.params.fromAmount),
|
|
36191
36173
|
target: depositData.depositAddress,
|
|
36192
36174
|
signer: solanaSigner,
|
|
36193
36175
|
connection: solanaConnection,
|
|
@@ -36697,12 +36679,8 @@ const useGetRoute = () => {
|
|
|
36697
36679
|
* These data will be used to trigger the transaction
|
|
36698
36680
|
* @returns {Route} Route data
|
|
36699
36681
|
*/
|
|
36700
|
-
return useMutation(async ({ fromChain, toChain, fromToken, toToken, sourceUserAddress, destinationAddress, fromPrice
|
|
36701
|
-
if (!fromChain ||
|
|
36702
|
-
!toChain ||
|
|
36703
|
-
!fromToken ||
|
|
36704
|
-
!toToken ||
|
|
36705
|
-
(!fromPrice && !toPrice)) {
|
|
36682
|
+
return useMutation(async ({ fromChain, toChain, fromToken, toToken, sourceUserAddress, destinationAddress, fromPrice, bypassGuardrails, quoteOnly, fromChainType, postHook, preHook, overrideGasRefundAddress, }) => {
|
|
36683
|
+
if (!fromChain || !toChain || !fromToken || !toToken || !fromPrice) {
|
|
36706
36684
|
return undefined;
|
|
36707
36685
|
}
|
|
36708
36686
|
// Dispatch requestQuote event
|
|
@@ -36712,7 +36690,6 @@ const useGetRoute = () => {
|
|
|
36712
36690
|
fromToken: fromToken.address,
|
|
36713
36691
|
toToken: toToken.address,
|
|
36714
36692
|
fromAmount: fromPrice,
|
|
36715
|
-
toAmount: toPrice,
|
|
36716
36693
|
fromAddress: sourceUserAddress,
|
|
36717
36694
|
toAddress: destinationAddress,
|
|
36718
36695
|
});
|
|
@@ -36721,13 +36698,13 @@ const useGetRoute = () => {
|
|
|
36721
36698
|
const fromTokenAddress = fromToken.address;
|
|
36722
36699
|
const toTokenAddress = toToken.address;
|
|
36723
36700
|
const fromAmount = parseToBigInt(fromPrice?.toString() ?? "0", fromToken?.decimals).toString();
|
|
36724
|
-
const toAmount = parseToBigInt(toPrice?.toString() ?? "0", toToken?.decimals).toString();
|
|
36725
36701
|
const fromAddress = sourceUserAddress ??
|
|
36726
36702
|
chainTypeToZeroAddressMap[fromChainType ?? ChainType.EVM];
|
|
36727
36703
|
const params = {
|
|
36728
36704
|
fromChain,
|
|
36729
36705
|
fromToken: fromTokenAddress,
|
|
36730
36706
|
fromAddress,
|
|
36707
|
+
fromAmount,
|
|
36731
36708
|
toChain,
|
|
36732
36709
|
toToken: toTokenAddress,
|
|
36733
36710
|
toAddress: destinationAddress ?? "",
|
|
@@ -36744,19 +36721,12 @@ const useGetRoute = () => {
|
|
|
36744
36721
|
cosmosFallbackAddresses[0].address) {
|
|
36745
36722
|
params.fallbackAddresses = cosmosFallbackAddresses;
|
|
36746
36723
|
}
|
|
36747
|
-
if (!isZeroAmount(fromAmount)) {
|
|
36748
|
-
params.fromAmount = fromAmount;
|
|
36749
|
-
}
|
|
36750
|
-
else if (!isZeroAmount(toAmount)) {
|
|
36751
|
-
params.toAmount = toAmount;
|
|
36752
|
-
}
|
|
36753
36724
|
const { route } = await squid.getRoute({
|
|
36754
36725
|
...params,
|
|
36755
|
-
...(prefer ? { prefer } : {}),
|
|
36756
36726
|
});
|
|
36757
36727
|
// Cache the route data
|
|
36758
36728
|
// Useful when the getRoute mutation is called from another hook
|
|
36759
|
-
queryClient.setQueryData(keys().transaction(fromChain, toChain, toToken.address, fromToken.address, fromPrice,
|
|
36729
|
+
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);
|
|
36760
36730
|
return route;
|
|
36761
36731
|
});
|
|
36762
36732
|
};
|
|
@@ -36770,7 +36740,7 @@ refetchIntervalInBackground = false, refetchInterval = 30000, quoteOnly = true,
|
|
|
36770
36740
|
const depositRefundAddress = useSwapRoutePersistStore((store) => store.swapRoute?.depositRefundAddress);
|
|
36771
36741
|
const { isAvailableAsPaymentMethod, isEnabled: isDepositAddressEnabled } = useDepositAddress();
|
|
36772
36742
|
const getRouteMutation = useGetRoute();
|
|
36773
|
-
const { fromChain, toChain,
|
|
36743
|
+
const { fromChain, toChain, fromPrice, destinationAddress: { address: destinationAddress } = {}, fromToken, toToken, } = useSwap();
|
|
36774
36744
|
const { connectedAddress: { address: sourceConnectedAddress }, } = useMultiChainWallet(fromChain);
|
|
36775
36745
|
// When the payment method is deposit address, users can specify a refund address on the source chain
|
|
36776
36746
|
// Tokens will be sent to this address in case of swap failure
|
|
@@ -36779,13 +36749,12 @@ refetchIntervalInBackground = false, refetchInterval = 30000, quoteOnly = true,
|
|
|
36779
36749
|
const sourceUserAddress = isDepositAddressEnabled && isAvailableAsPaymentMethod
|
|
36780
36750
|
? depositRefundAddress ?? sourceConnectedAddress
|
|
36781
36751
|
: sourceConnectedAddress;
|
|
36782
|
-
const squidRouteQueryKeys = useMemo(() => keys().transaction(fromChain?.chainId, toChain?.chainId, toToken?.address, fromToken?.address,
|
|
36752
|
+
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), [
|
|
36783
36753
|
fromChain?.chainId,
|
|
36784
36754
|
toChain?.chainId,
|
|
36785
36755
|
toToken?.address,
|
|
36786
36756
|
fromToken?.address,
|
|
36787
|
-
|
|
36788
|
-
toAmount,
|
|
36757
|
+
fromPrice,
|
|
36789
36758
|
config.slippage,
|
|
36790
36759
|
sourceUserAddress,
|
|
36791
36760
|
config.degenMode,
|
|
@@ -36796,12 +36765,12 @@ refetchIntervalInBackground = false, refetchInterval = 30000, quoteOnly = true,
|
|
|
36796
36765
|
config.preHook,
|
|
36797
36766
|
config.postHook,
|
|
36798
36767
|
config.overrideGasRefundAddress,
|
|
36799
|
-
config.prefer,
|
|
36800
36768
|
]);
|
|
36801
36769
|
const queryEnabled = enabled != undefined
|
|
36802
36770
|
? enabled
|
|
36803
36771
|
: squid !== undefined &&
|
|
36804
|
-
|
|
36772
|
+
fromPrice !== undefined &&
|
|
36773
|
+
fromPrice !== "0" &&
|
|
36805
36774
|
toChain?.chainId !== undefined &&
|
|
36806
36775
|
toToken?.address !== undefined;
|
|
36807
36776
|
const queryClient = useQueryClient();
|
|
@@ -36819,15 +36788,13 @@ refetchIntervalInBackground = false, refetchInterval = 30000, quoteOnly = true,
|
|
|
36819
36788
|
toToken,
|
|
36820
36789
|
sourceUserAddress,
|
|
36821
36790
|
destinationAddress,
|
|
36822
|
-
fromPrice
|
|
36823
|
-
toPrice: toAmount,
|
|
36791
|
+
fromPrice,
|
|
36824
36792
|
bypassGuardrails: config.degenMode,
|
|
36825
36793
|
quoteOnly,
|
|
36826
36794
|
fromChainType: fromChain?.chainType,
|
|
36827
36795
|
postHook: config.postHook,
|
|
36828
36796
|
preHook: config.preHook,
|
|
36829
36797
|
overrideGasRefundAddress: config.overrideGasRefundAddress,
|
|
36830
|
-
prefer: config.prefer,
|
|
36831
36798
|
});
|
|
36832
36799
|
return route;
|
|
36833
36800
|
}, {
|
|
@@ -37449,6 +37416,7 @@ const SquidProvider = ({ children, config, placeholder, }) => {
|
|
|
37449
37416
|
// Even with an error, we want wagmi to be defined so that we can display the maintenance mode layout
|
|
37450
37417
|
// Create wagmi config with mainnet as fallback in maintenance mode
|
|
37451
37418
|
const newWagmiConfig = createConfig({
|
|
37419
|
+
ssr: true,
|
|
37452
37420
|
chains: [mainnet],
|
|
37453
37421
|
connectors: [injected()],
|
|
37454
37422
|
transports: {
|
|
@@ -37487,5 +37455,5 @@ const SquidProvider = ({ children, config, placeholder, }) => {
|
|
|
37487
37455
|
React.createElement(CosmosProvider, null, children)))))))))) : (placeholder);
|
|
37488
37456
|
};
|
|
37489
37457
|
|
|
37490
|
-
export { useDepositAddress 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, useFavoriteTokensStore as M, Nr as N, useHistoryStore as O, useSendTransactionStore as P, QueryKeys as Q, useConfigStore as R, SquidStatusErrorType as S, TransactionErrorType as T, useSquidStore as U, useSwapRoutePersistStore as V, Wo as W, XamanXrplNetwork as X, useTransactionStore as Y, ConnectingWalletStatus as Z, useWalletStore as _, WindowWalletFlag as a, useGetOnrampPaymentTypes as a$, useSwap as a0, buildUrlSearchParamsFromSwapEvent as a1, parseInitialAssetsFromUrl as a2, useUrlSwapParams as a3, useAllConnectedWalletBalances as a4, useAllTokensWithBalanceForChainType as a5, useCosmosBalance as a6, useEvmBalance as a7, useMultiChainBalance as a8, useMultipleTokenPrices as a9, useSwapTransactionStatus as aA, useAvatar as aB, useHistory as aC, useDebouncedValue as aD, useAddToken as aE, useAutoConnect as aF, useEnsDataForAddress as aG, useEnsSearch as aH, useGnosisContext as aI, useIsSameAddressAndGnosisContext as aJ, useIntegratorContext as aK, useMultiChainWallet as aL, useSigner as aM, useWallet as aN, useWallets as aO, useXrplTrustLine as aP, TX_STATUS_CONSTANTS as aQ, FINAL_TRANSACTION_STATUSES as aR, useGetFiatQuote as aS, useGetOnRampConfig as aT, useExecuteFiatQuote as aU, useFiatOnRampTxStatus as aV, useFiatTransactions as aW, useCurrencyDetails as aX, useCountryDetails as aY, useAvailableQuotes as aZ, useRecommendedQuote as a_, useBitcoinNativeBalance as aa, useCosmosNativeBalance as ab, useEvmNativeBalance as ac, useNativeBalance as ad, useSolanaNativeBalance as ae, useStellarNativeBalance as af, useSuiNativeBalance as ag, useXrplNativeBalance as ah, useNativeTokenForChain as ai, useSingleTokenPrice as aj, useSourceChainGasToken as ak, useSquidTokens as al, useHistoricalData as am, useTokensData as an, useEstimateSendTransaction as ao, useSendTransaction as ap, useSendTransactionGas as aq, useAllTransactionsStatus as ar, useApproval as as, useEstimate as at, useEstimatePriceImpact as au, useExecuteTransaction as av, useGetRoute as aw, useGetRouteWrapper as ax, useRouteWarnings as ay, useSendTransactionStatus as az, chainTypeToZeroAddressMap as b, filterWagmiConnector as b$, useSuggestedFiatAmounts as b0, SquidProvider as b1, EnsService as b2, getXummClient as b3, isXamanXAppContext as b4, getQueryHeaders as b5, getStatusCode as b6, is404Error as b7, assetsBaseUrl as b8, shareSubgraphId as b9, fetchHighestBalanceToken as bA, getInitialOrDefaultTokenAddressForChain as bB, getInitialTokenAddressForChain as bC, filterTokensForDestination as bD, getInitialChainIdFromConfig as bE, getCosmosKey as bF, getKeysSettled as bG, getAllKeysForSupportedCosmosChains as bH, isCosmosAddressValid as bI, getCosmosSigningClient as bJ, getCosmosChainInfosObject as bK, connectCosmosWallet as bL, isFallbackAddressNeeded as bM, suggestChainOrThrow as bN, normalizeError as bO, transactionErrorCode as bP, isUserRejectionError as bQ, getTransactionError as bR, handleTransactionErrorEvents as bS, isSwapRouteError as bT, isStatusError as bU, createQuoteRequestParamsHash as bV, WidgetEvents as bW, EvmNetworkNotSupportedErrorCode as bX, addEthereumChain as bY, parseEvmAddress as bZ, formatEvmWallet as b_, sortTokensBySharedSubgraphIds as ba, getSupportedChainIdsForDirection as bb, filterChains as bc, filterTokens as bd, getTokenImage as be, getNewSwapParamsFromInput as bf, sortAllTokens as bg, findToken as bh, findNativeToken as bi, normalizeIbcAddress as bj, groupTokensBySymbol as bk, groupTokensByChainId as bl, filterViewableTokens as bm, getSecretNetworkBalances as bn, getTokenAssetsKey as bo, fetchAssetsColors as bp, initializeSquidWithAssetsColors as bq, isEmptyObject as br, normalizeTokenSymbol as bs, areTokenSymbolsCompatible as bt, isEvmosChain as bu, resolveChainIdFromAsset as bv, getConfigWithDefaults as bw, randomIntFromInterval as bx, getTokensForChain as by, getFirstAvailableChainId as bz, chainTypeToNativeTokenAddressMap as c,
|
|
37491
|
-
//# sourceMappingURL=index-
|
|
37458
|
+
export { useDepositAddress 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, useFavoriteTokensStore as M, Nr as N, useHistoryStore as O, useSendTransactionStore as P, QueryKeys as Q, useConfigStore as R, SquidStatusErrorType as S, TransactionErrorType as T, useSquidStore as U, useSwapRoutePersistStore as V, Wo as W, XamanXrplNetwork as X, useTransactionStore as Y, ConnectingWalletStatus as Z, useWalletStore as _, WindowWalletFlag as a, useGetOnrampPaymentTypes as a$, useSwap as a0, buildUrlSearchParamsFromSwapEvent as a1, parseInitialAssetsFromUrl as a2, useUrlSwapParams as a3, useAllConnectedWalletBalances as a4, useAllTokensWithBalanceForChainType as a5, useCosmosBalance as a6, useEvmBalance as a7, useMultiChainBalance as a8, useMultipleTokenPrices as a9, useSwapTransactionStatus as aA, useAvatar as aB, useHistory as aC, useDebouncedValue as aD, useAddToken as aE, useAutoConnect as aF, useEnsDataForAddress as aG, useEnsSearch as aH, useGnosisContext as aI, useIsSameAddressAndGnosisContext as aJ, useIntegratorContext as aK, useMultiChainWallet as aL, useSigner as aM, useWallet as aN, useWallets as aO, useXrplTrustLine as aP, TX_STATUS_CONSTANTS as aQ, FINAL_TRANSACTION_STATUSES as aR, useGetFiatQuote as aS, useGetOnRampConfig as aT, useExecuteFiatQuote as aU, useFiatOnRampTxStatus as aV, useFiatTransactions as aW, useCurrencyDetails as aX, useCountryDetails as aY, useAvailableQuotes as aZ, useRecommendedQuote as a_, useBitcoinNativeBalance as aa, useCosmosNativeBalance as ab, useEvmNativeBalance as ac, useNativeBalance as ad, useSolanaNativeBalance as ae, useStellarNativeBalance as af, useSuiNativeBalance as ag, useXrplNativeBalance as ah, useNativeTokenForChain as ai, useSingleTokenPrice as aj, useSourceChainGasToken as ak, useSquidTokens as al, useHistoricalData as am, useTokensData as an, useEstimateSendTransaction as ao, useSendTransaction as ap, useSendTransactionGas as aq, useAllTransactionsStatus as ar, useApproval as as, useEstimate as at, useEstimatePriceImpact as au, useExecuteTransaction as av, useGetRoute as aw, useGetRouteWrapper as ax, useRouteWarnings as ay, useSendTransactionStatus as az, chainTypeToZeroAddressMap as b, filterWagmiConnector as b$, useSuggestedFiatAmounts as b0, SquidProvider as b1, EnsService as b2, getXummClient as b3, isXamanXAppContext as b4, getQueryHeaders as b5, getStatusCode as b6, is404Error as b7, assetsBaseUrl as b8, shareSubgraphId as b9, fetchHighestBalanceToken as bA, getInitialOrDefaultTokenAddressForChain as bB, getInitialTokenAddressForChain as bC, filterTokensForDestination as bD, getInitialChainIdFromConfig as bE, getCosmosKey as bF, getKeysSettled as bG, getAllKeysForSupportedCosmosChains as bH, isCosmosAddressValid as bI, getCosmosSigningClient as bJ, getCosmosChainInfosObject as bK, connectCosmosWallet as bL, isFallbackAddressNeeded as bM, suggestChainOrThrow as bN, normalizeError as bO, transactionErrorCode as bP, isUserRejectionError as bQ, getTransactionError as bR, handleTransactionErrorEvents as bS, isSwapRouteError as bT, isStatusError as bU, createQuoteRequestParamsHash as bV, WidgetEvents as bW, EvmNetworkNotSupportedErrorCode as bX, addEthereumChain as bY, parseEvmAddress as bZ, formatEvmWallet as b_, sortTokensBySharedSubgraphIds as ba, getSupportedChainIdsForDirection as bb, filterChains as bc, filterTokens as bd, getTokenImage as be, getNewSwapParamsFromInput as bf, sortAllTokens as bg, findToken as bh, findNativeToken as bi, normalizeIbcAddress as bj, groupTokensBySymbol as bk, groupTokensByChainId as bl, filterViewableTokens as bm, getSecretNetworkBalances as bn, getTokenAssetsKey as bo, fetchAssetsColors as bp, initializeSquidWithAssetsColors as bq, isEmptyObject as br, normalizeTokenSymbol as bs, areTokenSymbolsCompatible as bt, isEvmosChain as bu, resolveChainIdFromAsset as bv, getConfigWithDefaults as bw, randomIntFromInterval as bx, getTokensForChain as by, getFirstAvailableChainId as bz, chainTypeToNativeTokenAddressMap as c, isHistoryTransactionFailed as c$, waitForReceiptWithRetry as c0, getUserCountry as c1, getCountryData as c2, getCurrencyData as c3, adaptiveRound as c4, getSuggestedAmountsForCurrency as c5, HederaExtensionHelper as c6, convertHederaAccountIdToEvmAddress as c7, convertEvmAddressToHederaAccountId as c8, scaleHbarToWei as c9, isValidHorizonAsset as cA, formatTransactionHistoryDate as cB, getAxelarExplorerTxUrl as cC, getSourceExplorerTxUrl as cD, getMainExplorerUrl as cE, formatDistance as cF, formatSeconds as cG, formatSwapTxStatusResponseForStorage as cH, simplifyRouteAction as cI, fetchSwapTransactionStatus as cJ, compareTransactionIds as cK, isCoralBridgeAction as cL, sleep as cM, isDepositRoute as cN, isChainflipBridgeTransaction as cO, isOnChainTxData as cP, getHistoryTransactionId as cQ, getStepStatuses as cR, getHalfSuccessState as cS, getStepsInfos as cT, getSwapTxStatusRefetchInterval as cU, getSendTxStatusRefetchInterval as cV, chainflipMultihopBridgeType as cW, getBridgeType as cX, getTransactionStatus as cY, getTransactionEndStatus as cZ, isHistoryTransactionPending as c_, scaleWeiToHbar as ca, parseToBigInt as cb, roundNumericValue as cc, formatUnitsRounded as cd, formatTokenAmount as ce, formatUsdAmount as cf, trimExtraDecimals as cg, getNumericValue as ch, cleanAmount as ci, convertTokenAmountToUSD as cj, convertUSDToTokenAmount as ck, calculateTotal24hChange as cl, getRouteExpiry as cm, searchTokens as cn, filterSolanaWallets as co, isSolanaAddressValid as cp, executeSolanaSwap as cq, executeSolanaTransfer as cr, isStellarAddressValid as cs, getStellarNetwork as ct, stellarAddressToScVal as cu, getStellarTrustLineAsset as cv, isStellarToken as cw, isStellarIssuedToken as cx, getStellarHorizonApiUrl as cy, isValidIssuedAsset as cz, definedInWindow as d, isHistoryTransactionWarning as d0, isHistoryTransactionEnded as d1, formatHash as d2, isWalletAddressValid as d3, redirectToExtensionsStore as d4, accessProperty as d5, populateWallets as d6, getDefaultChain as d7, sortWallets as d8, areSameAddress as d9, sortAddressBook as da, calculateTotalUsdBalanceUSD as db, addTokenToWallet as dc, isEvmChainNotSupportedError as dd, getWalletSupportedChainTypes as de, getConnectorForChainType as df, walletSupportsChainType as dg, connectWallet as dh, cancelConnectWallet as di, isProblematicConnector as dj, mergeWallets as dk, isXionSmartContractAddress as dl, isXrplAddressValid as dm, buildXrplTrustSetTx as dn, getXrplNetwork as dp, parseXrplPaymentTx as dq, parseXrplTokenAddress as dr, 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 };
|
|
37459
|
+
//# sourceMappingURL=index-DaYYG81O.js.map
|