@0xsquid/react-hooks 8.12.1-beta-arc.1 → 8.13.1-beta.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.
@@ -1610,7 +1610,7 @@ var _setCacheAdd = setCacheAdd$1;
1610
1610
  * @name has
1611
1611
  * @memberOf SetCache
1612
1612
  * @param {*} value The value to search for.
1613
- * @returns {number} Returns `true` if `value` is found, else `false`.
1613
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
1614
1614
  */
1615
1615
 
1616
1616
  function setCacheHas$1(value) {
@@ -10330,16 +10330,16 @@ bn.exports;
10330
10330
  var w = this.words[i];
10331
10331
  var word = (((w << off) | carry) & 0xffffff).toString(16);
10332
10332
  carry = (w >>> (24 - off)) & 0xffffff;
10333
- if (carry !== 0 || i !== this.length - 1) {
10334
- out = zeros[6 - word.length] + word + out;
10335
- } else {
10336
- out = word + out;
10337
- }
10338
10333
  off += 2;
10339
10334
  if (off >= 26) {
10340
10335
  off -= 26;
10341
10336
  i--;
10342
10337
  }
10338
+ if (carry !== 0 || i !== this.length - 1) {
10339
+ out = zeros[6 - word.length] + word + out;
10340
+ } else {
10341
+ out = word + out;
10342
+ }
10343
10343
  }
10344
10344
  if (carry !== 0) {
10345
10345
  out = carry.toString(16) + out;
@@ -10706,6 +10706,12 @@ bn.exports;
10706
10706
  // Handle the residue
10707
10707
  if (bitsLeft > 0) {
10708
10708
  this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));
10709
+ i++;
10710
+ }
10711
+
10712
+ // Clear words above the requested width so the result stays below 2 ** width
10713
+ for (; i < this.length; i++) {
10714
+ this.words[i] = 0;
10709
10715
  }
10710
10716
 
10711
10717
  // And remove leading zeroes
@@ -11799,6 +11805,10 @@ bn.exports;
11799
11805
  this.words[i] = carry;
11800
11806
  this.length++;
11801
11807
  }
11808
+ if (num === 0) {
11809
+ this.length = 1;
11810
+ this._normSign();
11811
+ }
11802
11812
 
11803
11813
  return this;
11804
11814
  };
@@ -12004,6 +12014,11 @@ bn.exports;
12004
12014
  this.words[this.length - 1] &= mask;
12005
12015
  }
12006
12016
 
12017
+ if (this.length === 0) {
12018
+ this.words[0] = 0;
12019
+ this.length = 1;
12020
+ }
12021
+
12007
12022
  return this.strip();
12008
12023
  };
12009
12024
 
@@ -12330,17 +12345,19 @@ bn.exports;
12330
12345
  // Fast case - exact division
12331
12346
  if (dm.mod.isZero()) return dm.div;
12332
12347
 
12333
- var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;
12348
+ var mod = dm.mod.abs();
12334
12349
 
12335
- var half = num.ushrn(1);
12336
- var r2 = num.andln(1);
12350
+ var half = num.abs().iushrn(1);
12351
+ var r2 = num.words[0] & 1;
12337
12352
  var cmp = mod.cmp(half);
12338
12353
 
12339
12354
  // Round down
12340
12355
  if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;
12341
12356
 
12342
- // Round up
12343
- return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);
12357
+ // Round up, away from zero
12358
+ var up = new BN(1);
12359
+ up.negative = this.negative ^ num.negative;
12360
+ return dm.div.iadd(up);
12344
12361
  };
12345
12362
 
12346
12363
  BN.prototype.modn = function modn (num) {
@@ -23661,7 +23678,7 @@ const filterViewableTokens = (tokens, config, direction) => {
23661
23678
  };
23662
23679
  const getSecretNetworkBalances = async (chainData, cosmosAddress, squidTokens, keplrTypeWallet) => {
23663
23680
  const squidSecretTokens = squidTokens.filter((t) => t.chainId === CHAIN_IDS.SECRET);
23664
- const { fetchAllSecretBalances } = await import('./secretService-D8ySaXvX.js');
23681
+ const { fetchAllSecretBalances } = await import('./secretService-DkpDcrSv.js');
23665
23682
  return fetchAllSecretBalances(chainData, cosmosAddress, squidSecretTokens, keplrTypeWallet);
23666
23683
  };
23667
23684
  function getTokenAssetsKey(token) {
@@ -28088,7 +28105,7 @@ function useStellarWallets() {
28088
28105
  try {
28089
28106
  const { allowAllModules: initializeAllModules } = await import('@creit.tech/stellar-wallets-kit');
28090
28107
  const { LedgerModule } = await import('@creit.tech/stellar-wallets-kit/modules/ledger.module.mjs');
28091
- const { formatStellarWallet } = await import('./stellarService.client-IiUZ6NO6.js');
28108
+ const { formatStellarWallet } = await import('./stellarService.client-BKpjqyn_.js');
28092
28109
  const modules = [...initializeAllModules(), new LedgerModule()];
28093
28110
  const promises = modules.map(async (module) => {
28094
28111
  const isAvailable = await module.isAvailable();
@@ -31535,7 +31552,7 @@ function hederaWalletConnect(parameters) {
31535
31552
  const optionalChains = config.chains.map((x) => x.id);
31536
31553
  if (!optionalChains.length)
31537
31554
  return;
31538
- const { EthereumProvider } = await import('./index.es-Bm5GQH70.js');
31555
+ const { EthereumProvider } = await import('./index.es-BWO-JBU8.js');
31539
31556
  const rawProvider = await EthereumProvider.init({
31540
31557
  ...restParameters,
31541
31558
  disableProviderPing: true,
@@ -39228,4 +39245,4 @@ const SquidProvider = ({ children, config, placeholder, }) => {
39228
39245
  };
39229
39246
 
39230
39247
  export { useWalletStore as $, AxelarStatusResponseType as A, useHederaAccountActivation as B, CHAIN_IDS as C, DEFAULT_LOCALE as D, useHederaTokenAssociations as E, useKeyboardNavigation as F, useSquidQueryClient as G, HistoryTxType as H, useSquid as I, useStellarAccountActivation as J, useStellarTrustLine as K, useAddressBookStore as L, useAssetsColorsStore 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, useAvailableQuotes 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, useRouteWarnings as aA, useSendTransactionStatus as aB, useSwapTransactionStatus as aC, useAvatar as aD, useHistory as aE, useDebouncedValue as aF, useAddToken as aG, useAutoConnect as aH, useEnsDataForAddress as aI, useEnsSearch as aJ, useGnosisContext as aK, useIsSameAddressAndGnosisContext as aL, useIntegratorContext as aM, useMultiChainWallet as aN, useSigner as aO, useWallet as aP, useWallets as aQ, useXrplTrustLine as aR, TX_STATUS_CONSTANTS as aS, FINAL_TRANSACTION_STATUSES as aT, useGetFiatQuote as aU, useGetOnRampConfig as aV, useExecuteFiatQuote as aW, useFiatOnRampTxStatus as aX, useFiatTransactions as aY, useCurrencyDetails as aZ, useCountryDetails 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, useDepositTransactionStatus as au, useEstimate as av, useEstimatePriceImpact as aw, useExecuteTransaction as ax, useGetRoute as ay, useGetRouteWrapper as az, DEFAULT_ROUTE_REFETCH_INTERVAL as b, addEthereumChain as b$, useRecommendedQuote as b0, useGetOnrampPaymentTypes as b1, useSuggestedFiatAmounts as b2, SquidProvider as b3, EnsService as b4, getXummClient as b5, isXamanXAppContext as b6, getQueryHeaders as b7, getStatusCode as b8, is404Error as b9, randomIntFromInterval as bA, getTokensForChain as bB, getFirstAvailableChainId as bC, fetchHighestBalanceToken as bD, getInitialOrDefaultTokenAddressForChain as bE, getInitialTokenAddressForChain as bF, filterTokensForDestination as bG, getInitialChainIdFromConfig as bH, getCosmosKey as bI, getKeysSettled as bJ, getAllKeysForSupportedCosmosChains as bK, isCosmosAddressValid as bL, getCosmosSigningClient as bM, getCosmosChainInfosObject as bN, connectCosmosWallet as bO, isFallbackAddressNeeded as bP, suggestChainOrThrow as bQ, normalizeError as bR, transactionErrorCode as bS, isUserRejectionError as bT, getTransactionError as bU, handleTransactionErrorEvents as bV, isSwapRouteError as bW, isStatusError as bX, createQuoteRequestParamsHash as bY, WidgetEvents as bZ, EvmNetworkNotSupportedErrorCode as b_, assetsBaseUrl as ba, shareSubgraphId as bb, sortTokensBySharedSubgraphIds as bc, getSupportedChainIdsForDirection as bd, filterChains as be, filterTokens as bf, getTokenImage as bg, getNewSwapParamsFromInput as bh, sortAllTokens as bi, findToken as bj, findNativeToken as bk, normalizeIbcAddress as bl, groupTokensBySymbol as bm, groupTokensByChainId as bn, filterViewableTokens as bo, getSecretNetworkBalances as bp, getTokenAssetsKey as bq, fetchAssetsColors as br, isSupportedChainType as bs, initializeSquidData as bt, isEmptyObject as bu, normalizeTokenSymbol as bv, areTokenSymbolsCompatible as bw, isEvmosChain as bx, resolveChainIdFromAsset as by, getConfigWithDefaults as bz, chainTypeToNativeTokenAddressMap as c, chainflipMultihopBridgeType as c$, parseEvmAddress as c0, formatEvmWallet as c1, filterWagmiConnector as c2, waitForReceiptWithRetry as c3, getUserCountry as c4, getCountryData as c5, getCurrencyData as c6, adaptiveRound as c7, getSuggestedAmountsForCurrency as c8, HederaExtensionHelper 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, isActionCompletedOnSourceTx as cP, sleep as cQ, isChainflipDepositRoute as cR, isChainflipBridgeTransaction as cS, isOnChainTxData as cT, isDepositAddressDirectTransferRoute as cU, getHistoryTransactionId as cV, getStepStatuses as cW, getHalfSuccessState as cX, getStepsInfos as cY, getSwapTxStatusRefetchInterval as cZ, getSendTxStatusRefetchInterval as c_, convertHederaAccountIdToEvmAddress as ca, convertEvmAddressToHederaAccountId as cb, scaleHbarToWei as cc, scaleWeiToHbar as cd, parseToBigInt as ce, roundNumericValue as cf, formatUnitsRounded as cg, formatTokenAmount as ch, formatUsdAmount as ci, trimExtraDecimals as cj, getNumericValue 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, getBridgeType as d0, getTransactionStatus as d1, getTransactionEndStatus as d2, isHistoryTransactionPending as d3, isHistoryTransactionFailed as d4, isHistoryTransactionWarning as d5, isHistoryTransactionEnded as d6, formatHash as d7, isWalletAddressValid as d8, redirectToExtensionsStore as d9, populateWallets as da, buildFallbackWallets as db, getDefaultChain as dc, sortWallets as dd, areSameAddress as de, sortAddressBook as df, calculateTotalUsdBalanceUSD as dg, addTokenToWallet as dh, isEvmChainNotSupportedError as di, getWalletSupportedChainTypes as dj, getConnectorForChainType as dk, walletSupportsChainType as dl, connectWallet as dm, cancelConnectWallet as dn, isProblematicConnector as dp, mergeWallets as dq, isXionSmartContractAddress as dr, isXrplAddressValid as ds, buildXrplTrustSetTx as dt, getXrplNetwork as du, parseXrplPaymentTx as dv, parseXrplTokenAddress as dw, er as e, formatBNToReadable as f, chainTypeToZeroAddressMap as g, destinationAddressResetValue as h, fallbackAddressResetValue as i, nativeCantonTokenAddress as j, nativeCosmosTokenAddress as k, nativeEvmTokenAddress as l, nativeSolanaTokenAddress as m, nativeBitcoinTokenAddress as n, nativeStellarTokenAddress as o, nativeSuiTokenAddress as p, nativeXrplTokenAddress as q, CosmosProvider as r, SendTransactionStatus as s, TransactionStatus as t, useCosmosContext as u, useTrackSearchEmpty as v, walletIconBaseUrl as w, useSquidChains as x, useClient as y, useCosmosForChain as z };
39231
- //# sourceMappingURL=index-BVneqIL5.js.map
39248
+ //# sourceMappingURL=index-oLTLWI9S.js.map