@0xsquid/react-hooks 8.7.2-beta-interactive-to-amount.2 → 8.8.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.
Files changed (35) hide show
  1. package/dist/core/queries/queries-keys.d.ts +1 -1
  2. package/dist/core/types/config.d.ts +1 -2
  3. package/dist/core/types/event.d.ts +2 -1
  4. package/dist/core/types/route.d.ts +4 -0
  5. package/dist/hooks/store/useSquidStore.d.ts +1 -2
  6. package/dist/hooks/swap/useSwap.d.ts +2 -4
  7. package/dist/hooks/transaction/useGetRoute.d.ts +8 -9
  8. package/dist/{index-BhIaRT6b.js → index-CHdL63Y4.js} +67 -158
  9. package/dist/index-CHdL63Y4.js.map +1 -0
  10. package/dist/{index-cWo0aVvt.js → index-IxCpRlyV.js} +67 -160
  11. package/dist/index-IxCpRlyV.js.map +1 -0
  12. package/dist/{index.es-DDv7Krv1.js → index.es-B_4aEeiW.js} +2 -2
  13. package/dist/{index.es-DDv7Krv1.js.map → index.es-B_4aEeiW.js.map} +1 -1
  14. package/dist/{index.es-DjscAACC.js → index.es-C1qztDII.js} +2 -2
  15. package/dist/{index.es-DjscAACC.js.map → index.es-C1qztDII.js.map} +1 -1
  16. package/dist/index.esm.js +1 -1
  17. package/dist/index.js +2 -4
  18. package/dist/index.js.map +1 -1
  19. package/dist/{secretService-XZVHxElk.js → secretService-D0p2T9tf.js} +2 -2
  20. package/dist/{secretService-XZVHxElk.js.map → secretService-D0p2T9tf.js.map} +1 -1
  21. package/dist/{secretService-cYEbiXXP.js → secretService-vD8qpukk.js} +2 -2
  22. package/dist/{secretService-cYEbiXXP.js.map → secretService-vD8qpukk.js.map} +1 -1
  23. package/dist/services/internal/assetsService.d.ts +1 -1
  24. package/dist/services/internal/errorService.d.ts +0 -9
  25. package/dist/services/internal/estimateService.d.ts +18 -8
  26. package/dist/services/internal/eventService.d.ts +2 -1
  27. package/dist/services/internal/numberService.d.ts +0 -1
  28. package/dist/services/internal/transactionService.d.ts +7 -1
  29. package/dist/{stellarService.client-CBqIkpcb.js → stellarService.client-Cia5YJMU.js} +2 -2
  30. package/dist/{stellarService.client-CBqIkpcb.js.map → stellarService.client-Cia5YJMU.js.map} +1 -1
  31. package/dist/{stellarService.client-B5B1XaV_.js → stellarService.client-DKQ8QpMf.js} +2 -2
  32. package/dist/{stellarService.client-B5B1XaV_.js.map → stellarService.client-DKQ8QpMf.js.map} +1 -1
  33. package/package.json +3 -3
  34. package/dist/index-BhIaRT6b.js.map +0 -1
  35. package/dist/index-cWo0aVvt.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
@@ -4404,35 +4401,6 @@ const isSwapRouteError = (error) => {
4404
4401
  const isStatusError = (error) => {
4405
4402
  return error && typeof error.errorType === "string";
4406
4403
  };
4407
- // --------------------
4408
- // SQUID ROUTE ERROR MESSAGES
4409
- // --------------------
4410
- const GENERIC_ROUTE_ERROR_MESSAGE = "Oops! something went wrong. Try again later";
4411
- const squidRouteErrorMapping = {
4412
- Unknown: GENERIC_ROUTE_ERROR_MESSAGE,
4413
- UnknownError: GENERIC_ROUTE_ERROR_MESSAGE,
4414
- SquidServiceError: GENERIC_ROUTE_ERROR_MESSAGE,
4415
- BAD_REQUEST: GENERIC_ROUTE_ERROR_MESSAGE,
4416
- };
4417
- /**
4418
- * Extract a human-readable message from a Squid route error.
4419
- *
4420
- * Accepts either a raw `SquidRouteError` or an axios-shaped error with the
4421
- * route error nested in `response.data`, so callers don't have to unwrap.
4422
- * Falls back to a generic message when no usable string is available.
4423
- */
4424
- const getSquidRouteErrorMessage = (error) => {
4425
- const candidate = (error?.response?.data ?? error);
4426
- if (typeof candidate?.message === "string" && candidate.message.length > 0) {
4427
- return candidate.message;
4428
- }
4429
- if (typeof candidate?.type === "string") {
4430
- const mapped = squidRouteErrorMapping[candidate.type];
4431
- if (mapped)
4432
- return mapped;
4433
- }
4434
- return GENERIC_ROUTE_ERROR_MESSAGE;
4435
- };
4436
4404
 
4437
4405
  // Xion has a way to create smart contract accounts (with social logins) these are 63 characters long
4438
4406
  // And the particularity is that we can't derive the osmosis fallback address from these because they don't have a way to access funds in other networks
@@ -21139,8 +21107,18 @@ const compareTransactionIds = (idA, idB) => {
21139
21107
  */
21140
21108
  function isCoralBridgeAction(action) {
21141
21109
  return (action.type === ActionType.RFQ &&
21142
- // TODO: update types
21143
- action.provider?.toLowerCase() === "coral");
21110
+ // TODO: update types to use enum
21111
+ action.provider === "Squid Intents");
21112
+ }
21113
+ /**
21114
+ * Determines if a given action completes as part of the user's source transaction.
21115
+ * Action types like RFQ are fulfilled by a solver in a separate transaction,
21116
+ * so they are NOT completed on source even if they share the same chain.
21117
+ */
21118
+ function isActionCompletedOnSourceTx(action, fromChainId) {
21119
+ if (action.type === ActionType.RFQ)
21120
+ return false;
21121
+ return action.fromChain === fromChainId && action.toChain === fromChainId;
21144
21122
  }
21145
21123
  function sleep(ms) {
21146
21124
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -22424,15 +22402,14 @@ const keys = () => ({
22424
22402
  // ============
22425
22403
  // Transactions
22426
22404
  // ============
22427
- transaction: (fromChainId, toChainId, toTokenAddress, fromTokenAddress, fromAmount, toAmount, slippage, sourceUserAddress, degenMode, destinationAddress, fallbackAddress, quoteOnly, fromChainType, preHook, postHook, overrideGasRefundAddress, prefer) => [
22405
+ transaction: (fromChainId, toChainId, toTokenAddress, fromTokenAddress, price, slippage, sourceUserAddress, degenMode, destinationAddress, fallbackAddress, quoteOnly, fromChainType, preHook, postHook, overrideGasRefundAddress) => [
22428
22406
  ...keys().transactions(),
22429
22407
  QueryKeys.Transaction,
22430
22408
  fromChainId,
22431
22409
  toChainId,
22432
22410
  toTokenAddress,
22433
22411
  fromTokenAddress,
22434
- fromAmount,
22435
- toAmount,
22412
+ price,
22436
22413
  slippage,
22437
22414
  sourceUserAddress,
22438
22415
  degenMode,
@@ -22443,7 +22420,6 @@ const keys = () => ({
22443
22420
  preHook,
22444
22421
  postHook,
22445
22422
  overrideGasRefundAddress,
22446
- prefer,
22447
22423
  ],
22448
22424
  swapTransactionStatus: (transactionId) => [
22449
22425
  ...keys().transactions(),
@@ -22635,7 +22611,6 @@ const getConfigWithDefaults = (config) => {
22635
22611
  preHook: get$2(config, "preHook", defaultConfigValues.preHook),
22636
22612
  postHook: get$2(config, "postHook", defaultConfigValues.postHook),
22637
22613
  overrideGasRefundAddress: get$2(config, "overrideGasRefundAddress", defaultConfigValues.overrideGasRefundAddress),
22638
- prefer: get$2(config, "prefer", defaultConfigValues.prefer),
22639
22614
  };
22640
22615
  };
22641
22616
  const randomIntFromInterval = (min, max) => {
@@ -23329,7 +23304,7 @@ const filterViewableTokens = (tokens, config, direction) => {
23329
23304
  };
23330
23305
  const getSecretNetworkBalances = async (chainData, cosmosAddress, squidTokens, keplrTypeWallet) => {
23331
23306
  const squidSecretTokens = squidTokens.filter((t) => t.chainId === CHAIN_IDS.SECRET);
23332
- const { fetchAllSecretBalances } = await import('./secretService-cYEbiXXP.js');
23307
+ const { fetchAllSecretBalances } = await import('./secretService-vD8qpukk.js');
23333
23308
  return fetchAllSecretBalances(chainData, cosmosAddress, squidSecretTokens, keplrTypeWallet);
23334
23309
  };
23335
23310
  function getTokenAssetsKey(token) {
@@ -25186,7 +25161,10 @@ const useConfigStore = create(() => ({
25186
25161
  isInitialized: false,
25187
25162
  }));
25188
25163
  const useTransactionStore = create((set, get) => ({
25164
+ fromPrice: undefined,
25165
+ txLocalId: undefined,
25189
25166
  transactions: {},
25167
+ currentTransaction: undefined,
25190
25168
  setTransactionState(txId, tx) {
25191
25169
  if (!txId)
25192
25170
  return;
@@ -26724,7 +26702,7 @@ function useStellarWallets() {
26724
26702
  try {
26725
26703
  const { allowAllModules: initializeAllModules } = await import('@creit.tech/stellar-wallets-kit');
26726
26704
  const { LedgerModule } = await import('@creit.tech/stellar-wallets-kit/modules/ledger.module.mjs');
26727
- const { formatStellarWallet } = await import('./stellarService.client-B5B1XaV_.js');
26705
+ const { formatStellarWallet } = await import('./stellarService.client-DKQ8QpMf.js');
26728
26706
  const modules = [...initializeAllModules(), new LedgerModule()];
26729
26707
  const promises = modules.map(async (module) => {
26730
26708
  const isAvailable = await module.isAvailable();
@@ -27623,8 +27601,7 @@ const useMultiChainWallet = (chain) => {
27623
27601
 
27624
27602
  const useSwap = () => {
27625
27603
  const { initialAssets, defaultTokensPerChain, disabledChains, availableChains, } = useConfigStore((state) => state.config);
27626
- const fromAmount = useTransactionStore((state) => state.fromAmount);
27627
- const toAmount = useTransactionStore((state) => state.toAmount);
27604
+ const fromPrice = useTransactionStore((state) => state.fromPrice);
27628
27605
  const { swapRoute } = useSwapRoutePersistStore();
27629
27606
  const { tokens } = useSquidTokens();
27630
27607
  const queryClient = useQueryClient();
@@ -27676,17 +27653,8 @@ const useSwap = () => {
27676
27653
  }),
27677
27654
  };
27678
27655
  }, [destAddressData, destAddressEnsData.data, toChain?.chainType]);
27679
- const fromAmountChanged = useCallback((amount) => {
27680
- useTransactionStore.setState({
27681
- fromAmount: amount || undefined,
27682
- toAmount: undefined,
27683
- });
27684
- }, []);
27685
- const toAmountChanged = useCallback((amount) => {
27686
- useTransactionStore.setState({
27687
- toAmount: amount || undefined,
27688
- fromAmount: undefined,
27689
- });
27656
+ const fromPriceChanged = useCallback((price) => {
27657
+ useTransactionStore.setState({ fromPrice: price || undefined });
27690
27658
  }, []);
27691
27659
  /**
27692
27660
  * When user changes something from the SwapView
@@ -27846,10 +27814,8 @@ const useSwap = () => {
27846
27814
  tokenItems,
27847
27815
  onSwapChange,
27848
27816
  invertSwaps,
27849
- fromAmount,
27850
- toAmount,
27851
- fromAmountChanged,
27852
- toAmountChanged,
27817
+ fromPrice,
27818
+ fromPriceChanged,
27853
27819
  toToken,
27854
27820
  fromToken,
27855
27821
  fromChain,
@@ -29592,14 +29558,20 @@ const useEvmNativeBalance = ({ address, chain, }) => {
29592
29558
  },
29593
29559
  });
29594
29560
  const balance = useMemo(() => {
29595
- if (nativeEvmBalance?.decimals && nativeEvmBalance?.value) {
29561
+ if (nativeEvmBalance?.decimals != null && nativeEvmBalance?.value != null) {
29562
+ if (chain?.chainId === CHAIN_IDS.HEDERA) {
29563
+ return {
29564
+ decimals: 8,
29565
+ value: scaleWeiToHbar(nativeEvmBalance.value),
29566
+ };
29567
+ }
29596
29568
  return {
29597
29569
  decimals: nativeEvmBalance.decimals,
29598
29570
  value: nativeEvmBalance.value,
29599
29571
  };
29600
29572
  }
29601
29573
  return;
29602
- }, [nativeEvmBalance?.decimals, nativeEvmBalance?.value]);
29574
+ }, [nativeEvmBalance?.decimals, nativeEvmBalance?.value, chain?.chainId]);
29603
29575
  return {
29604
29576
  balance,
29605
29577
  isLoading,
@@ -30056,7 +30028,7 @@ function hederaWalletConnect(parameters) {
30056
30028
  const optionalChains = config.chains.map((x) => x.id);
30057
30029
  if (!optionalChains.length)
30058
30030
  return;
30059
- const { EthereumProvider } = await import('./index.es-DDv7Krv1.js');
30031
+ const { EthereumProvider } = await import('./index.es-B_4aEeiW.js');
30060
30032
  const rawProvider = await EthereumProvider.init({
30061
30033
  ...restParameters,
30062
30034
  disableProviderPing: true,
@@ -31547,19 +31519,6 @@ const formatEstimatedRouteDuration = ({ estimatedRouteDuration, isSingleChainRou
31547
31519
  format: (sTemplate, mTemplate, hTemplate) => formatSeconds(durationInSeconds, sTemplate, mTemplate, hTemplate),
31548
31520
  };
31549
31521
  };
31550
- /**
31551
- * Calculates and formats various estimate results based on the provided Squid route and additional parameters.
31552
- *
31553
- * @param {RouteResponse["route"]} squidRoute - The Squid route containing estimate information.
31554
- * @param {Token[]} tokens - An array of token objects.
31555
- * @param {ChainData} fromChain - The source chain object.
31556
- * @param {ChainData} toChain - The destination chain object.
31557
- * @param {boolean} collectFees - Flag indicating whether to collect fees.
31558
- * @param {string} nativeTokenBalanceFromChain - The native token balance on the source chain.
31559
- * @param {boolean} expressActivatedUI - Flag indicating whether express mode is activated in the UI.
31560
- * @returns {Object} An object containing various estimate results and calculations, including token information,
31561
- * amounts, fees, gas costs, and other relevant data for the transaction.
31562
- */
31563
31522
  const calculateEstimateResults = ({ squidRoute, tokens, fromChain, toChain, collectFees, chainFeeParams, gasToken, }) => {
31564
31523
  const fromToken = findToken(tokens, squidRoute?.params.fromChain, squidRoute?.params.fromToken);
31565
31524
  const fromAmount = squidRoute?.estimate?.fromAmount;
@@ -31578,7 +31537,7 @@ const calculateEstimateResults = ({ squidRoute, tokens, fromChain, toChain, coll
31578
31537
  const integratorFeeCost = allFeeCosts.length > 0 && collectFees
31579
31538
  ? allFeeCosts.find((f) => f.name === "Integrator fee")
31580
31539
  : undefined;
31581
- const expectedGasRefundCost = calculateExpectedGasRefundCost(firstFeeCost, fromChain?.chainType, estimate?.actions.map(simplifyRouteAction));
31540
+ const expectedGasRefundCost = calculateExpectedGasRefundCost(firstFeeCost, fromChain?.chainType, estimate?.actions?.map(simplifyRouteAction));
31582
31541
  const expectedGasRefundCostUSD = convertTokenAmountToUSD(formatBNToReadable(expectedGasRefundCost, firstFeeCost?.token.decimals ?? 18), firstFeeCost?.token.usdPrice ?? "0");
31583
31542
  const sameTokenBetweenFees = firstFeeCost?.token.address === firstGasCost?.token.address &&
31584
31543
  firstFeeCost?.token.chainId === firstGasCost?.token.chainId;
@@ -32462,7 +32421,7 @@ const useHistory = (txType) => {
32462
32421
  fromChain: tx.params.fromChain,
32463
32422
  fromToken: tx.params.fromToken,
32464
32423
  fromAddress: tx.params.fromAddress,
32465
- fromAmount: tx.params.fromAmount || tx.estimate.fromAmount,
32424
+ fromAmount: tx.params.fromAmount,
32466
32425
  toChain: tx.params.toChain,
32467
32426
  toToken: tx.params.toToken,
32468
32427
  toAddress: tx.params.toAddress,
@@ -32703,7 +32662,7 @@ const useApproval = ({ squidRoute, }) => {
32703
32662
  const publicClient = usePublicClient();
32704
32663
  const queryClient = useQueryClient();
32705
32664
  const squid = useSquidStore((state) => state.squid);
32706
- const { fromChain, fromToken, fromAmount, toAmount, isSameChain } = useSwap();
32665
+ const { fromChain, fromToken, fromPrice, isSameChain } = useSwap();
32707
32666
  const { evmSigner } = useSigner({ chain: fromChain });
32708
32667
  const { connector: activeConnector } = useAccount();
32709
32668
  const { getChainType } = useSquidChains();
@@ -32876,9 +32835,9 @@ const useApproval = ({ squidRoute, }) => {
32876
32835
  // This is to ensure we're using the latest expiry timestamp
32877
32836
  if (squidRoute) {
32878
32837
  queryClient.refetchQueries({
32879
- queryKey: keys().transaction(squidRoute.params.fromChain, squidRoute.params.toChain, squidRoute.params.toToken, squidRoute.params.fromToken, fromAmount, toAmount, 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,
32838
+ 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,
32880
32839
  // TODO: update types
32881
- squidRoute.params?.overrideGasRefundAddress, squidRoute.params?.prefer),
32840
+ squidRoute.params?.overrideGasRefundAddress),
32882
32841
  });
32883
32842
  }
32884
32843
  },
@@ -32895,7 +32854,7 @@ const AXELAR_PROVIDER_IMAGE_URL = "https://raw.githubusercontent.com/0xsquid/ass
32895
32854
  const useEstimate = (squidRoute) => {
32896
32855
  const collectFees = useConfigStore((state) => state.config.collectFees);
32897
32856
  const { tokens } = useSquidTokens();
32898
- const { fromChain, toChain, fromAmount } = useSwap();
32857
+ const { fromChain, toChain, fromPrice } = useSwap();
32899
32858
  const fromToken = useMemo(() => findToken(tokens, squidRoute?.params.fromChain, squidRoute?.params.fromToken), [tokens, squidRoute?.params.fromChain, squidRoute?.params.fromToken]);
32900
32859
  const { chainFeeParams, gasToken } = useSourceChainGasToken({
32901
32860
  fromChain,
@@ -32991,9 +32950,9 @@ const useEstimate = (squidRoute) => {
32991
32950
  const slippageFormatted = Number(squidRoute?.estimate?.aggregateSlippage ?? 0).toFixed(2) + "%";
32992
32951
  const fromBalanceEnoughToSwap = useMemo(() => {
32993
32952
  const fromBalanceNum = Number(fromBalanceFormatted ?? 0);
32994
- const fromAmountNum = Number(fromAmount ?? 0);
32995
- return fromBalanceNum >= fromAmountNum;
32996
- }, [fromBalanceFormatted, fromAmount]);
32953
+ const fromPriceNum = Number(fromPrice ?? 0);
32954
+ return fromBalanceNum >= fromPriceNum;
32955
+ }, [fromBalanceFormatted, fromPrice]);
32997
32956
  return {
32998
32957
  ...estimateResults,
32999
32958
  fromBalanceFormatted,
@@ -35938,6 +35897,12 @@ coin.DecProto = {
35938
35897
 
35939
35898
  const useExecuteTransaction = (squidRoute) => {
35940
35899
  const { fromChain, toChain, fromToken, toToken, isSameChain } = useSwap();
35900
+ // A route completes on source tx only if it's same-chain AND
35901
+ // every action is fulfilled in the user's source transaction
35902
+ const isCompletedOnSourceTx = isSameChain &&
35903
+ !!fromChain &&
35904
+ !!squidRoute &&
35905
+ squidRoute.estimate.actions.every((a) => isActionCompletedOnSourceTx(a, fromChain.chainId));
35941
35906
  const { evmSigner, cosmosSigner, solanaSigner, bitcoinSigner, suiSigner, xrplSigner, stellarSigner, } = useSigner({
35942
35907
  chain: fromChain,
35943
35908
  });
@@ -35972,7 +35937,7 @@ const useExecuteTransaction = (squidRoute) => {
35972
35937
  routeType: route.transactionRequest.type,
35973
35938
  nonce,
35974
35939
  transactionId: txHash,
35975
- transactionIdForStatus: transactionIdForStatus ?? txHash,
35940
+ transactionIdForStatus,
35976
35941
  quoteId,
35977
35942
  status,
35978
35943
  sourceStatus,
@@ -36212,12 +36177,8 @@ const useExecuteTransaction = (squidRoute) => {
36212
36177
  if (!depositData?.depositAddress) {
36213
36178
  throw new Error("Deposit address is required");
36214
36179
  }
36215
- const fromAmount = route.params.fromAmount || route.estimate.fromAmount;
36216
- if (isZeroAmount(fromAmount)) {
36217
- throw new Error("fromAmount is required for Solana transfer");
36218
- }
36219
36180
  const signature = await executeSolanaTransfer({
36220
- amount: BigInt(fromAmount),
36181
+ amount: BigInt(route.params.fromAmount),
36221
36182
  target: depositData.depositAddress,
36222
36183
  signer: solanaSigner,
36223
36184
  connection: solanaConnection,
@@ -36276,43 +36237,6 @@ const useExecuteTransaction = (squidRoute) => {
36276
36237
  ? error
36277
36238
  : new Error("Failed to execute Solana transaction");
36278
36239
  }
36279
- }, {
36280
- onError: (error, variables) => {
36281
- const currentTx = getTransaction(variables.id);
36282
- const errorObject = getTransactionError(error);
36283
- setTransactionStoreState(variables.id, {
36284
- ...currentTx,
36285
- status: TransactionStatus.ERROR,
36286
- sourceStatus: TransactionStatus.ERROR,
36287
- error: errorObject,
36288
- });
36289
- if (currentTx?.transactionId &&
36290
- errorObject.type === TransactionErrorType.CALL_EXCEPTION) {
36291
- replaceSwapTransactionStatus({
36292
- transactionId: currentTx.transactionId,
36293
- statusResponse: currentTx.statusResponse,
36294
- status: TransactionStatus.ERROR,
36295
- });
36296
- }
36297
- },
36298
- onSuccess: (_data, variables) => {
36299
- const currentTx = getTransaction(variables.id);
36300
- queryClient.invalidateQueries(getPrefixKey(QueryKeys.Balances));
36301
- if (isSameChain && currentTx?.transactionId) {
36302
- replaceSwapTransactionStatus({
36303
- transactionId: currentTx.transactionId,
36304
- statusResponse: currentTx.statusResponse,
36305
- status: TransactionStatus.SUCCESS,
36306
- });
36307
- }
36308
- setTransactionStoreState(variables.id, {
36309
- ...currentTx,
36310
- sourceStatus: TransactionStatus.SUCCESS,
36311
- status: isSameChain
36312
- ? TransactionStatus.SUCCESS
36313
- : TransactionStatus.ONGOING,
36314
- });
36315
- },
36316
36240
  });
36317
36241
  const swapMutationBitcoin = useMutation(async ({ id, route }) => {
36318
36242
  const { depositAddress, amount: sendAmount, chainflipStatusTrackingId, } = useDepositAddressStore.getState().deposit ?? {};
@@ -36533,7 +36457,7 @@ const useExecuteTransaction = (squidRoute) => {
36533
36457
  const handleTransactionSuccess = useCallback((id) => {
36534
36458
  const currentTx = getTransaction(id);
36535
36459
  queryClient.invalidateQueries(getPrefixKey(QueryKeys.Balances));
36536
- if (isSameChain && currentTx?.transactionId) {
36460
+ if (isCompletedOnSourceTx && currentTx?.transactionId) {
36537
36461
  replaceSwapTransactionStatus({
36538
36462
  transactionId: currentTx.transactionId,
36539
36463
  statusResponse: currentTx.statusResponse,
@@ -36543,13 +36467,13 @@ const useExecuteTransaction = (squidRoute) => {
36543
36467
  setTransactionStoreState(id, {
36544
36468
  ...currentTx,
36545
36469
  sourceStatus: TransactionStatus.SUCCESS,
36546
- status: isSameChain
36470
+ status: isCompletedOnSourceTx
36547
36471
  ? TransactionStatus.SUCCESS
36548
36472
  : TransactionStatus.ONGOING,
36549
36473
  });
36550
36474
  }, [
36551
36475
  getTransaction,
36552
- isSameChain,
36476
+ isCompletedOnSourceTx,
36553
36477
  queryClient,
36554
36478
  replaceSwapTransactionStatus,
36555
36479
  setTransactionStoreState,
@@ -36572,8 +36496,8 @@ const useExecuteTransaction = (squidRoute) => {
36572
36496
  if (currentTx?.transactionId &&
36573
36497
  errorObject.type === TransactionErrorType.CALL_EXCEPTION) {
36574
36498
  replaceSwapTransactionStatus({
36575
- transactionId: currentTx?.transactionId,
36576
- statusResponse: currentTx?.statusResponse,
36499
+ transactionId: currentTx.transactionId,
36500
+ statusResponse: currentTx.statusResponse,
36577
36501
  status: TransactionStatus.ERROR,
36578
36502
  });
36579
36503
  }
@@ -36727,12 +36651,8 @@ const useGetRoute = () => {
36727
36651
  * These data will be used to trigger the transaction
36728
36652
  * @returns {Route} Route data
36729
36653
  */
36730
- return useMutation(async ({ fromChain, toChain, fromToken, toToken, sourceUserAddress, destinationAddress, fromPrice = "", toPrice = "", bypassGuardrails, quoteOnly, fromChainType, postHook, preHook, overrideGasRefundAddress, prefer, }) => {
36731
- if (!fromChain ||
36732
- !toChain ||
36733
- !fromToken ||
36734
- !toToken ||
36735
- (!fromPrice && !toPrice)) {
36654
+ return useMutation(async ({ fromChain, toChain, fromToken, toToken, sourceUserAddress, destinationAddress, fromPrice, bypassGuardrails, quoteOnly, fromChainType, postHook, preHook, overrideGasRefundAddress, }) => {
36655
+ if (!fromChain || !toChain || !fromToken || !toToken || !fromPrice) {
36736
36656
  return undefined;
36737
36657
  }
36738
36658
  // Dispatch requestQuote event
@@ -36742,7 +36662,6 @@ const useGetRoute = () => {
36742
36662
  fromToken: fromToken.address,
36743
36663
  toToken: toToken.address,
36744
36664
  fromAmount: fromPrice,
36745
- toAmount: toPrice,
36746
36665
  fromAddress: sourceUserAddress,
36747
36666
  toAddress: destinationAddress,
36748
36667
  });
@@ -36751,13 +36670,13 @@ const useGetRoute = () => {
36751
36670
  const fromTokenAddress = fromToken.address;
36752
36671
  const toTokenAddress = toToken.address;
36753
36672
  const fromAmount = parseToBigInt(fromPrice?.toString() ?? "0", fromToken?.decimals).toString();
36754
- const toAmount = parseToBigInt(toPrice?.toString() ?? "0", toToken?.decimals).toString();
36755
36673
  const fromAddress = sourceUserAddress ??
36756
36674
  chainTypeToZeroAddressMap[fromChainType ?? ChainType.EVM];
36757
36675
  const params = {
36758
36676
  fromChain,
36759
36677
  fromToken: fromTokenAddress,
36760
36678
  fromAddress,
36679
+ fromAmount,
36761
36680
  toChain,
36762
36681
  toToken: toTokenAddress,
36763
36682
  toAddress: destinationAddress ?? "",
@@ -36774,19 +36693,12 @@ const useGetRoute = () => {
36774
36693
  cosmosFallbackAddresses[0].address) {
36775
36694
  params.fallbackAddresses = cosmosFallbackAddresses;
36776
36695
  }
36777
- if (!isZeroAmount(fromAmount)) {
36778
- params.fromAmount = fromAmount;
36779
- }
36780
- else if (!isZeroAmount(toAmount)) {
36781
- params.toAmount = toAmount;
36782
- }
36783
36696
  const { route } = await squid.getRoute({
36784
36697
  ...params,
36785
- ...(prefer ? { prefer } : {}),
36786
36698
  });
36787
36699
  // Cache the route data
36788
36700
  // Useful when the getRoute mutation is called from another hook
36789
- queryClient.setQueryData(keys().transaction(fromChain, toChain, toToken.address, fromToken.address, fromPrice, toPrice, config.slippage, sourceUserAddress, config.degenMode, destinationAddress, swapRoute?.fallbackAddress, quoteOnly, fromChainType, config.preHook, config.postHook, overrideGasRefundAddress, config.prefer), route);
36701
+ 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);
36790
36702
  return route;
36791
36703
  });
36792
36704
  };
@@ -36800,7 +36712,7 @@ refetchIntervalInBackground = false, refetchInterval = 30000, quoteOnly = true,
36800
36712
  const depositRefundAddress = useSwapRoutePersistStore((store) => store.swapRoute?.depositRefundAddress);
36801
36713
  const { isAvailableAsPaymentMethod, isEnabled: isDepositAddressEnabled } = useDepositAddress();
36802
36714
  const getRouteMutation = useGetRoute();
36803
- const { fromChain, toChain, fromAmount, toAmount, destinationAddress: { address: destinationAddress } = {}, fromToken, toToken, } = useSwap();
36715
+ const { fromChain, toChain, fromPrice, destinationAddress: { address: destinationAddress } = {}, fromToken, toToken, } = useSwap();
36804
36716
  const { connectedAddress: { address: sourceConnectedAddress }, } = useMultiChainWallet(fromChain);
36805
36717
  // When the payment method is deposit address, users can specify a refund address on the source chain
36806
36718
  // Tokens will be sent to this address in case of swap failure
@@ -36809,13 +36721,12 @@ refetchIntervalInBackground = false, refetchInterval = 30000, quoteOnly = true,
36809
36721
  const sourceUserAddress = isDepositAddressEnabled && isAvailableAsPaymentMethod
36810
36722
  ? depositRefundAddress ?? sourceConnectedAddress
36811
36723
  : sourceConnectedAddress;
36812
- const squidRouteQueryKeys = useMemo(() => keys().transaction(fromChain?.chainId, toChain?.chainId, toToken?.address, fromToken?.address, fromAmount, toAmount, config.slippage, sourceUserAddress, config.degenMode, destinationAddress, fallbackAddress, quoteOnly, fromChain?.chainType, config.preHook, config.postHook, config.overrideGasRefundAddress, config.prefer), [
36724
+ 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), [
36813
36725
  fromChain?.chainId,
36814
36726
  toChain?.chainId,
36815
36727
  toToken?.address,
36816
36728
  fromToken?.address,
36817
- fromAmount,
36818
- toAmount,
36729
+ fromPrice,
36819
36730
  config.slippage,
36820
36731
  sourceUserAddress,
36821
36732
  config.degenMode,
@@ -36826,12 +36737,12 @@ refetchIntervalInBackground = false, refetchInterval = 30000, quoteOnly = true,
36826
36737
  config.preHook,
36827
36738
  config.postHook,
36828
36739
  config.overrideGasRefundAddress,
36829
- config.prefer,
36830
36740
  ]);
36831
36741
  const queryEnabled = enabled != undefined
36832
36742
  ? enabled
36833
36743
  : squid !== undefined &&
36834
- (!isZeroAmount(fromAmount) || !isZeroAmount(toAmount)) &&
36744
+ fromPrice !== undefined &&
36745
+ fromPrice !== "0" &&
36835
36746
  toChain?.chainId !== undefined &&
36836
36747
  toToken?.address !== undefined;
36837
36748
  const queryClient = useQueryClient();
@@ -36849,15 +36760,13 @@ refetchIntervalInBackground = false, refetchInterval = 30000, quoteOnly = true,
36849
36760
  toToken,
36850
36761
  sourceUserAddress,
36851
36762
  destinationAddress,
36852
- fromPrice: fromAmount,
36853
- toPrice: toAmount,
36763
+ fromPrice,
36854
36764
  bypassGuardrails: config.degenMode,
36855
36765
  quoteOnly,
36856
36766
  fromChainType: fromChain?.chainType,
36857
36767
  postHook: config.postHook,
36858
36768
  preHook: config.preHook,
36859
36769
  overrideGasRefundAddress: config.overrideGasRefundAddress,
36860
- prefer: config.prefer,
36861
36770
  });
36862
36771
  return route;
36863
36772
  }, {
@@ -37518,5 +37427,5 @@ const SquidProvider = ({ children, config, placeholder, }) => {
37518
37427
  React.createElement(CosmosProvider, null, children)))))))))) : (placeholder);
37519
37428
  };
37520
37429
 
37521
- 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, parseEvmAddress 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, GENERIC_ROUTE_ERROR_MESSAGE as bV, getSquidRouteErrorMessage as bW, createQuoteRequestParamsHash as bX, WidgetEvents as bY, EvmNetworkNotSupportedErrorCode as bZ, addEthereumChain 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, getTransactionStatus as c$, formatEvmWallet as c0, filterWagmiConnector as c1, waitForReceiptWithRetry as c2, getUserCountry as c3, getCountryData as c4, getCurrencyData as c5, adaptiveRound as c6, getSuggestedAmountsForCurrency as c7, HederaExtensionHelper as c8, convertHederaAccountIdToEvmAddress as c9, isStellarIssuedToken as cA, getStellarHorizonApiUrl as cB, isValidIssuedAsset as cC, isValidHorizonAsset as cD, formatTransactionHistoryDate as cE, getAxelarExplorerTxUrl as cF, getSourceExplorerTxUrl as cG, getMainExplorerUrl as cH, formatDistance as cI, formatSeconds as cJ, formatSwapTxStatusResponseForStorage as cK, simplifyRouteAction as cL, fetchSwapTransactionStatus as cM, compareTransactionIds as cN, isCoralBridgeAction as cO, sleep as cP, isDepositRoute as cQ, isChainflipBridgeTransaction as cR, isOnChainTxData as cS, getHistoryTransactionId as cT, getStepStatuses as cU, getHalfSuccessState as cV, getStepsInfos as cW, getSwapTxStatusRefetchInterval as cX, getSendTxStatusRefetchInterval as cY, chainflipMultihopBridgeType as cZ, getBridgeType as c_, convertEvmAddressToHederaAccountId as ca, scaleHbarToWei as cb, scaleWeiToHbar as cc, parseToBigInt as cd, roundNumericValue as ce, formatUnitsRounded as cf, formatTokenAmount as cg, formatUsdAmount as ch, trimExtraDecimals as ci, getNumericValue as cj, isZeroAmount as ck, cleanAmount as cl, convertTokenAmountToUSD as cm, convertUSDToTokenAmount as cn, calculateTotal24hChange as co, getRouteExpiry as cp, searchTokens as cq, filterSolanaWallets as cr, isSolanaAddressValid as cs, executeSolanaSwap as ct, executeSolanaTransfer as cu, isStellarAddressValid as cv, getStellarNetwork as cw, stellarAddressToScVal as cx, getStellarTrustLineAsset as cy, isStellarToken as cz, definedInWindow as d, getTransactionEndStatus as d0, isHistoryTransactionPending as d1, isHistoryTransactionFailed as d2, isHistoryTransactionWarning as d3, isHistoryTransactionEnded as d4, formatHash as d5, isWalletAddressValid as d6, redirectToExtensionsStore as d7, accessProperty as d8, populateWallets as d9, getDefaultChain as da, sortWallets as db, areSameAddress as dc, sortAddressBook as dd, calculateTotalUsdBalanceUSD as de, addTokenToWallet as df, isEvmChainNotSupportedError as dg, getWalletSupportedChainTypes as dh, getConnectorForChainType as di, walletSupportsChainType as dj, connectWallet as dk, cancelConnectWallet as dl, isProblematicConnector as dm, mergeWallets as dn, isXionSmartContractAddress as dp, isXrplAddressValid as dq, buildXrplTrustSetTx as dr, getXrplNetwork as ds, parseXrplPaymentTx as dt, parseXrplTokenAddress as du, 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 };
37522
- //# sourceMappingURL=index-BhIaRT6b.js.map
37430
+ 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, isHistoryTransactionPending 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, isActionCompletedOnSourceTx 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_, 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, 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 };
37431
+ //# sourceMappingURL=index-CHdL63Y4.js.map