@0xsquid/react-hooks 8.8.1-beta-canton.0 → 8.8.1-beta-canton.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.
@@ -21004,6 +21004,7 @@ const getSourceExplorerTxUrl = (chain, txID) => {
21004
21004
  case CHAIN_IDS.AGORIC:
21005
21005
  case CHAIN_IDS.XRPL:
21006
21006
  case CHAIN_IDS.XRPL_TESTNET:
21007
+ case CHAIN_IDS.CANTON:
21007
21008
  txSuffix = "/transactions/";
21008
21009
  break;
21009
21010
  case CHAIN_IDS.HEDERA:
@@ -21113,10 +21114,16 @@ const simplifyRouteAction = (action) => {
21113
21114
  };
21114
21115
  const fetchSwapTransactionStatus = async ({ transaction, integratorId, apiUrl, }) => {
21115
21116
  const statusEndpoint = `${apiUrl}/v2/status`;
21117
+ const isCanton = transaction?.fromChain === CHAIN_IDS.CANTON;
21118
+ // For Canton, the backend handles all tx detection/submission from the quoteId
21119
+ // alone, so no transactionId is sent — only the quoteId param below.
21120
+ const transactionId = isCanton
21121
+ ? undefined
21122
+ : transaction?.transactionIdForStatus ?? transaction?.transactionId;
21116
21123
  try {
21117
21124
  const response = await axios.get(statusEndpoint, {
21118
21125
  params: {
21119
- transactionId: transaction?.transactionIdForStatus ?? transaction?.transactionId,
21126
+ transactionId,
21120
21127
  fromChainId: transaction?.fromChain,
21121
21128
  toChainId: transaction?.toChain,
21122
21129
  bridgeType: transaction?.bridgeType,
@@ -23368,7 +23375,7 @@ const filterViewableTokens = (tokens, config, direction) => {
23368
23375
  };
23369
23376
  const getSecretNetworkBalances = async (chainData, cosmosAddress, squidTokens, keplrTypeWallet) => {
23370
23377
  const squidSecretTokens = squidTokens.filter((t) => t.chainId === CHAIN_IDS.SECRET);
23371
- const { fetchAllSecretBalances } = await Promise.resolve().then(function () { return require('./secretService-Dg5_VwtW.js'); });
23378
+ const { fetchAllSecretBalances } = await Promise.resolve().then(function () { return require('./secretService-CX1ATsQ9.js'); });
23372
23379
  return fetchAllSecretBalances(chainData, cosmosAddress, squidSecretTokens, keplrTypeWallet);
23373
23380
  };
23374
23381
  function getTokenAssetsKey(token) {
@@ -26777,7 +26784,7 @@ function useStellarWallets() {
26777
26784
  try {
26778
26785
  const { allowAllModules: initializeAllModules } = await import('@creit.tech/stellar-wallets-kit');
26779
26786
  const { LedgerModule } = await import('@creit.tech/stellar-wallets-kit/modules/ledger.module.mjs');
26780
- const { formatStellarWallet } = await Promise.resolve().then(function () { return require('./stellarService.client-BFUfF3-j.js'); });
26787
+ const { formatStellarWallet } = await Promise.resolve().then(function () { return require('./stellarService.client-CCKxXDnB.js'); });
26781
26788
  const modules = [...initializeAllModules(), new LedgerModule()];
26782
26789
  const promises = modules.map(async (module) => {
26783
26790
  const isAvailable = await module.isAvailable();
@@ -30127,7 +30134,7 @@ function hederaWalletConnect(parameters) {
30127
30134
  const optionalChains = config.chains.map((x) => x.id);
30128
30135
  if (!optionalChains.length)
30129
30136
  return;
30130
- const { EthereumProvider } = await Promise.resolve().then(function () { return require('./index.es-Q71H7cJa.js'); });
30137
+ const { EthereumProvider } = await Promise.resolve().then(function () { return require('./index.es-DEBBJ-GV.js'); });
30131
30138
  const rawProvider = await EthereumProvider.init({
30132
30139
  ...restParameters,
30133
30140
  disableProviderPing: true,
@@ -30868,6 +30875,7 @@ function useDepositAddress(squidRoute) {
30868
30875
  setDeposit({
30869
30876
  amount: route.params.fromAmount ?? "",
30870
30877
  depositAddress: route.transactionRequest.target,
30878
+ // Squid Scan indexes the Canton tx by the orderHash
30871
30879
  statusTrackingId: orderHash,
30872
30880
  memo: orderHash,
30873
30881
  });
@@ -33048,9 +33056,13 @@ const useSwapStatusQuery = ({ transaction, retry = 25, refetchOnWindowFocus = "a
33048
33056
  // Statuses that indicate the source deposit has been received and the swap is
33049
33057
  // now progressing — the point at which it becomes a history-backed transaction.
33050
33058
  const sourceReceivedStatuses = [
33059
+ // Chainflip
33051
33060
  "DEPOSIT_RECEIVED",
33052
33061
  "BROADCAST_REQUESTED",
33053
33062
  "COMPLETE",
33063
+ // Canton (Squid Intents)
33064
+ "awaiting",
33065
+ "success",
33054
33066
  ];
33055
33067
  /**
33056
33068
  * Tracks a generated deposit address before it becomes a persisted swap history item.
@@ -33088,7 +33100,7 @@ const useDepositTransactionStatus = ({ transaction, route, retry = 25, refetchOn
33088
33100
  fromAddress: transaction.fromAddress,
33089
33101
  transactionId: txLocalId,
33090
33102
  transactionIdForStatus: transaction.transactionIdForStatus,
33091
- quoteId: route.quoteId,
33103
+ quoteId: transaction.quoteId ?? "",
33092
33104
  status: exports.TransactionStatus.ONGOING,
33093
33105
  sourceStatus: exports.TransactionStatus.SUCCESS,
33094
33106
  timestamp: Date.now(),
@@ -37904,4 +37916,4 @@ exports.useXrplTrustLine = useXrplTrustLine;
37904
37916
  exports.waitForReceiptWithRetry = waitForReceiptWithRetry;
37905
37917
  exports.walletIconBaseUrl = walletIconBaseUrl;
37906
37918
  exports.walletSupportsChainType = walletSupportsChainType;
37907
- //# sourceMappingURL=index-D1udDcRZ.js.map
37919
+ //# sourceMappingURL=index-cJsML84P.js.map