@glacislabs/stablegenie-zerodelta 4.10.0 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1736,7 +1736,7 @@ var CHANNEL_HEADER = "x-zd-channel";
1736
1736
  var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
1737
1737
  var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
1738
1738
  var WIDGET_CHANNEL = "widget";
1739
- var WIDGET_VERSION = "4.10.0" ;
1739
+ var WIDGET_VERSION = "4.11.0" ;
1740
1740
  var MAX_CHANNEL_VERSION_LEN = 32;
1741
1741
  function sanitizeVersion(raw) {
1742
1742
  const v = String(raw).trim();
@@ -2199,9 +2199,11 @@ async function fetchPaymentPlan(api, request, payer, wallet = {}, readBalances)
2199
2199
  perChainBest.push(option);
2200
2200
  }
2201
2201
  }
2202
- for (const option of [...heldOptions, ...perChainBest, ...leftovers].slice(0, MAX_QUOTE_CANDIDATES)) {
2202
+ const ranked = [...heldOptions, ...perChainBest, ...leftovers];
2203
+ for (const option of ranked.slice(0, MAX_QUOTE_CANDIDATES)) {
2203
2204
  candidates.push(option);
2204
2205
  }
2206
+ const unquotedOptions = ranked.slice(MAX_QUOTE_CANDIDATES);
2205
2207
  const routeErrors = [];
2206
2208
  const routePromises = candidates.map(
2207
2209
  (option) => buildRoute({
@@ -2243,6 +2245,7 @@ async function fetchPaymentPlan(api, request, payer, wallet = {}, readBalances)
2243
2245
  expiresAt: new Date(Date.now() + 2 * 60 * 1e3).toISOString(),
2244
2246
  apiBase: api.apiBase,
2245
2247
  routes: routesBuilt,
2248
+ unquotedOptions,
2246
2249
  fundingBalances: walletBalances,
2247
2250
  fundingAccount: payer.toLowerCase(),
2248
2251
  destination: {
@@ -2256,6 +2259,21 @@ async function fetchPaymentPlan(api, request, payer, wallet = {}, readBalances)
2256
2259
  }
2257
2260
  };
2258
2261
  }
2262
+ async function quotePayOption(api, request, payer, picked, wallet = {}) {
2263
+ validateDestination(request);
2264
+ assertAddress(payer, "Payer wallet");
2265
+ const [chains, tokens, routes, health] = await Promise.all([api.fetchChains(), api.fetchTokens(), api.fetchRoutes(), api.fetchRouteHealth()]);
2266
+ const catalogue = buildCatalogue({ chains, tokens, routes, product: "stable", supportedChainIds: SUPPORTED_CHAIN_IDS, brokenLanes: suppressedLanes(health) });
2267
+ const destination = { ...request, chainId: Number(request.chainId), asset: symbolKey(request.asset) };
2268
+ const destinationToken = findToken(tokens, destination.chainId, destination.asset);
2269
+ if (!destinationToken) throw new Error(`${destination.asset} is not enabled on ${chainNameOf(destination.chainId, chains)}.`);
2270
+ const allowedFunding = wallet.fundingAssets?.length ? new Set(wallet.fundingAssets.map(symbolKey)) : null;
2271
+ const option = buildPayOptions({ invoiceAsset: destination.asset, invoiceChainId: destination.chainId, tokens, routes, chains, walletChainId: wallet.chainId, catalogue }).find(
2272
+ (o) => !o.direct && Number(o.chainId) === Number(picked.chainId) && o.address.toLowerCase() === String(picked.address).toLowerCase() && (!allowedFunding || allowedFunding.has(o.symbolKey))
2273
+ );
2274
+ if (!option) throw new Error("That funding option is not available for this payment right now.");
2275
+ return buildRoute({ option, destination, destinationToken, chains, tokens, payer, fetchQuote: api.fetchQuote });
2276
+ }
2259
2277
 
2260
2278
  // src/core/swap.ts
2261
2279
  function validateSwap(swap = {}) {
@@ -2777,6 +2795,7 @@ function createEngine(config = {}) {
2777
2795
  });
2778
2796
  },
2779
2797
  fetchPaymentPlan: (request, payer, wallet) => fetchPaymentPlan(api, request, payer, wallet, verifier.readBalances),
2798
+ quotePayOption: (request, payer, option, wallet) => quotePayOption(api, request, payer, option, wallet),
2780
2799
  quoteSwapPreview: (swap, owner) => quoteSwapPreview(api, swap, owner),
2781
2800
  buildSwapPlan: (swap, payer, wallet) => buildSwapPlan(api, swap, payer, wallet),
2782
2801
  payerNonceBaseline: verifier.payerNonceBaseline,
@@ -3168,6 +3187,10 @@ function useFlow(args) {
3168
3187
  const routes = plan?.routes ?? [];
3169
3188
  const selected = react.useMemo(() => routes.find((r) => r.id === selectedId) ?? routes.find((r) => r.recommended) ?? routes[0] ?? null, [routes, selectedId]);
3170
3189
  const reload = react.useCallback(() => setNonce((n) => n + 1), []);
3190
+ const addRoute = react.useCallback((route) => {
3191
+ setPlan((p) => p ? { ...p, routes: [...p.routes.filter((r) => r.id !== route.id), route] } : p);
3192
+ setSelectedId(route.id);
3193
+ }, []);
3171
3194
  react.useEffect(() => {
3172
3195
  if (busyRef.current) return;
3173
3196
  setFieldError(null);
@@ -3390,7 +3413,8 @@ function useFlow(args) {
3390
3413
  quotePaused,
3391
3414
  quoteStale,
3392
3415
  submit,
3393
- reload
3416
+ reload,
3417
+ addRoute
3394
3418
  };
3395
3419
  }
3396
3420
  function balanceKey(chainId, tokenAddress) {
@@ -3652,6 +3676,11 @@ var WIDGET_CSS = `
3652
3676
  /* skeleton loading */
3653
3677
  .sg-skel{height:64px;border-radius:var(--sg-radius-control);background:linear-gradient(90deg,var(--sg-surface) 25%,color-mix(in srgb,var(--sg-border) 50%,var(--sg-surface)) 37%,var(--sg-surface) 63%);background-size:400% 100%;animation:sg-shimmer 1.2s ease-in-out infinite;margin-bottom:8px}
3654
3678
 
3679
+ .sg-skel--amt{display:inline-block;width:112px;height:30px;margin:0;vertical-align:middle;border-radius:10px}
3680
+ .sg-skel--row{height:48px}
3681
+ .sg-pay-loading{display:flex;flex-direction:column}
3682
+ .sg-pay-loading-line{display:flex;align-items:center;gap:8px;font-size:13px;line-height:16px;padding:2px 2px 0}
3683
+
3655
3684
  /* spinner */
3656
3685
  .sg-spinner{display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:999px;animation:sg-spin 0.7s linear infinite;vertical-align:-2px}
3657
3686
  @keyframes sg-spin{to{transform:rotate(360deg)}}
@@ -4817,9 +4846,9 @@ function TokenSelect(props) {
4817
4846
  const [chainFilter, setChainFilter] = react.useState(null);
4818
4847
  const [query, setQuery] = react.useState("");
4819
4848
  const chains = react.useMemo(() => {
4820
- const live = new Set(props.tokens.filter((t) => !props.optionStates?.[rowKey(t)]?.disabled).map((t) => Number(t.chainId)));
4821
- return props.chains.filter((c) => live.has(Number(c.chainId)));
4822
- }, [props.chains, props.tokens, props.optionStates]);
4849
+ const listed = new Set(props.tokens.map((t) => Number(t.chainId)));
4850
+ return props.chains.filter((c) => listed.has(Number(c.chainId)));
4851
+ }, [props.chains, props.tokens]);
4823
4852
  const activeFilter = chainFilter != null && chains.some((c) => Number(c.chainId) === chainFilter) ? chainFilter : null;
4824
4853
  const rows = react.useMemo(() => {
4825
4854
  const q = query.trim().toLowerCase();
@@ -6736,6 +6765,21 @@ function PayCard(props) {
6736
6765
  );
6737
6766
  const heldIds = react.useMemo(() => new Set(held.map((a) => a.route.id)), [held]);
6738
6767
  const scannedEmpty = !holdings.loading && Object.keys(holdings.balances).length > 0 && held.length === 0;
6768
+ const [failedOptions, setFailedOptions] = react.useState(/* @__PURE__ */ new Set());
6769
+ const [pricing, setPricing] = react.useState(null);
6770
+ const [pickError, setPickError] = react.useState(null);
6771
+ react.useEffect(() => {
6772
+ setFailedOptions(/* @__PURE__ */ new Set());
6773
+ setPricing(null);
6774
+ setPickError(null);
6775
+ }, [wallet.account, paramsKey]);
6776
+ const unquoted = react.useMemo(
6777
+ () => (paymentPlan?.unquotedOptions ?? []).filter(
6778
+ (o) => (!fundingSet || fundingSet.has(o.symbolKey)) && (STABLES2.has(o.symbolKey)) && !failedOptions.has(balanceKey(o.chainId, o.address))
6779
+ ),
6780
+ [paymentPlan, fundingSet, method, failedOptions]
6781
+ );
6782
+ const listBalances = react.useMemo(() => ({ ...prefetchedBalances ?? {}, ...holdings.balances }), [prefetchedBalances, holdings.balances]);
6739
6783
  const optionStates = react.useMemo(() => {
6740
6784
  const map = {};
6741
6785
  for (const a of annotated) {
@@ -6758,8 +6802,19 @@ function PayCard(props) {
6758
6802
  map[key] = { disabled: false };
6759
6803
  }
6760
6804
  }
6805
+ for (const o of unquoted) {
6806
+ const key = balanceKey(o.chainId, o.address);
6807
+ if (map[key]) continue;
6808
+ let zero = false;
6809
+ try {
6810
+ zero = BigInt(listBalances[key]?.raw ?? "x") === 0n;
6811
+ } catch {
6812
+ zero = false;
6813
+ }
6814
+ map[key] = zero ? { disabled: true, reason: "no-balance", hint: "No balance on this chain" } : { disabled: false };
6815
+ }
6761
6816
  return map;
6762
- }, [annotated, holdings.loading]);
6817
+ }, [annotated, holdings.loading, unquoted, listBalances]);
6763
6818
  const [catalogue, setCatalogue] = react.useState(null);
6764
6819
  const chains = react.useMemo(() => {
6765
6820
  const order = new Map(SUPPORTED_CHAINS.map((id, i) => [id, i]));
@@ -6779,24 +6834,27 @@ function PayCard(props) {
6779
6834
  const fundingTokens = react.useMemo(() => {
6780
6835
  const seen = /* @__PURE__ */ new Set();
6781
6836
  const list = [];
6782
- for (const r of visibleRoutes) {
6783
- const key = balanceKey(r.source.chainId, r.source.tokenAddress);
6784
- if (seen.has(key)) continue;
6837
+ const push = (chainId, address, fallback) => {
6838
+ const key = balanceKey(chainId, address);
6839
+ if (seen.has(key)) return;
6785
6840
  seen.add(key);
6786
- const reg = registryTokens.find((t) => Number(t.chainId) === r.source.chainId && addrEq2(t.address, r.source.tokenAddress));
6787
- list.push(
6788
- reg ?? {
6789
- symbol: r.source.asset,
6790
- displaySymbol: r.source.ticker,
6791
- name: r.source.asset,
6792
- chainId: r.source.chainId,
6793
- address: r.source.tokenAddress ?? "",
6794
- decimals: r.source.decimals ?? 18
6795
- }
6796
- );
6841
+ list.push(registryTokens.find((t) => Number(t.chainId) === chainId && addrEq2(t.address, address)) ?? fallback);
6842
+ };
6843
+ for (const r of visibleRoutes) {
6844
+ push(r.source.chainId, r.source.tokenAddress, {
6845
+ symbol: r.source.asset,
6846
+ displaySymbol: r.source.ticker,
6847
+ name: r.source.asset,
6848
+ chainId: r.source.chainId,
6849
+ address: r.source.tokenAddress ?? "",
6850
+ decimals: r.source.decimals ?? 18
6851
+ });
6852
+ }
6853
+ for (const o of unquoted) {
6854
+ push(o.chainId, o.address, { symbol: o.symbol, displaySymbol: o.ticker, name: o.name, chainId: o.chainId, address: o.address, decimals: o.decimals, logoUrl: o.logoUrl });
6797
6855
  }
6798
6856
  return list;
6799
- }, [visibleRoutes, registryTokens]);
6857
+ }, [visibleRoutes, unquoted, registryTokens]);
6800
6858
  const fundingChains = react.useMemo(() => {
6801
6859
  const ids = new Set(fundingTokens.map((t) => Number(t.chainId)));
6802
6860
  return chains.filter((c) => ids.has(Number(c.chainId)));
@@ -6840,9 +6898,23 @@ function PayCard(props) {
6840
6898
  react.useEffect(() => setHist(null), [wallet.account]);
6841
6899
  const lastTxOwned = Boolean(flow.lastTxEntry?.hash && wallet.account && flow.lastTxEntry.account === wallet.account.toLowerCase());
6842
6900
  const pickFunding = (pick) => {
6901
+ setPickError(null);
6843
6902
  const r = visibleRoutes.find((x) => x.source.chainId === pick.chainId && symbolKey(x.source.asset) === symbolKey(pick.symbol));
6844
- if (r) selectRoute(r.id);
6903
+ if (r) {
6904
+ selectRoute(r.id);
6905
+ closeSelector();
6906
+ return;
6907
+ }
6908
+ const option = unquoted.find((o) => o.chainId === pick.chainId && o.symbolKey === symbolKey(pick.symbol));
6845
6909
  closeSelector();
6910
+ if (!option || !wallet.account) return;
6911
+ const key = balanceKey(option.chainId, option.address);
6912
+ setPricing(key);
6913
+ userPicked.current = true;
6914
+ engine.quotePayOption({ address: props.recipient, chainId: props.toChainId, asset: props.toAsset, amount: props.amount }, wallet.account, { chainId: option.chainId, address: option.address }, { chainId: wallet.chainId ?? void 0, fundingAssets: planFundingAssets }).then((route) => flow.addRoute(route)).catch(() => {
6915
+ setFailedOptions((prev) => /* @__PURE__ */ new Set([...prev, key]));
6916
+ setPickError(`${option.ticker || option.symbol} on ${option.chainName} cannot settle this payment right now. Pick another way to pay.`);
6917
+ }).finally(() => setPricing((cur) => cur === key ? null : cur));
6846
6918
  };
6847
6919
  const parked = !isLiveMethod(method);
6848
6920
  const submitting = flow.status === "submitting";
@@ -6869,7 +6941,7 @@ function PayCard(props) {
6869
6941
  setSheet(false);
6870
6942
  requestAnimationFrame(() => complianceBtnRef.current?.focus());
6871
6943
  };
6872
- const payLabel = parked ? "Coming soon" : submitting ? "Paying\u2026" : flow.quoteStale ? flow.quotePaused ? "Refresh quote" : "Refreshing quote\u2026" : flow.insufficient ? "Insufficient balance" : flow.nativeShortfall ? flow.nativeShortfall : sel && selectedVisible ? `Pay ${groupDecimal(atLeastCents(sel.source.payAmount))} ${sel.source.ticker || sel.source.asset}` : "Pay";
6944
+ const payLabel = parked ? "Coming soon" : wallet.account && (flow.status === "loading" || pricing !== null) ? "Finding the best way to pay\u2026" : submitting ? "Paying\u2026" : flow.quoteStale ? flow.quotePaused ? "Refresh quote" : "Refreshing quote\u2026" : flow.insufficient ? "Insufficient balance" : flow.nativeShortfall ? flow.nativeShortfall : sel && selectedVisible ? `Pay ${groupDecimal(atLeastCents(sel.source.payAmount))} ${sel.source.ticker || sel.source.asset}` : "Pay";
6873
6945
  const walletSlot = wallet.account ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-head-tools", children: [
6874
6946
  /* @__PURE__ */ jsxRuntime.jsx(HistoryButton, { btnRef: histBtnRef, disabled: submitting, onClick: () => setHist({}) }),
6875
6947
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sg-wallet", "data-connected": "true", children: [
@@ -6883,14 +6955,14 @@ function PayCard(props) {
6883
6955
  { label: "Network fee", value: nativeWei > 0n ? `~${formatNative(nativeWei)} ${nativeSymbol(sel.source.chainId)}` : "Gas only" },
6884
6956
  ...durationLabel(sel.quote.estimatedDuration) ? [{ label: "Estimated time", value: durationLabel(sel.quote.estimatedDuration) }] : []
6885
6957
  ] : [];
6886
- const loadingPlan = flow.status === "loading" || holdings.loading && !sel;
6958
+ const loadingPlan = flow.status === "loading" || holdings.loading && !sel || pricing !== null;
6887
6959
  return /* @__PURE__ */ jsxRuntime.jsx(WidgetShell, { title: config.title || "Complete payment", theme: config.theme, heightPx: props.heightPx, walletSlot, onClose: props.onClose, children: hist && wallet.account ? /* @__PURE__ */ jsxRuntime.jsx(TxHistoryPanel, { account: wallet.account, tokens: registryTokens, vaultIcons: catalogue?.vaultIcons, initialEntry: hist.entry ?? null, onBack: closeHistory }) : view === "select" && wallet.account ? /* @__PURE__ */ jsxRuntime.jsx(
6888
6960
  TokenSelect,
6889
6961
  {
6890
6962
  title: "Pay with",
6891
6963
  chains: fundingChains,
6892
6964
  tokens: fundingTokens,
6893
- balances: holdings.balances,
6965
+ balances: listBalances,
6894
6966
  optionStates,
6895
6967
  onBack: closeSelector,
6896
6968
  onPick: pickFunding
@@ -6921,7 +6993,7 @@ function PayCard(props) {
6921
6993
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-pane", "data-kind": "pay", children: [
6922
6994
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-pane-label", children: "You pay" }),
6923
6995
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-pane-mid", children: [
6924
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-amt-out", "aria-live": "polite", children: loadingPlan ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-amt-empty", children: "\u2026" }) : sel && selectedVisible ? /* @__PURE__ */ jsxRuntime.jsx(AmountText, { value: groupDecimal(atLeastCents(sel.source.payAmount)) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-amt-empty", children: "\u2014" }) }),
6996
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-amt-out", "aria-live": "polite", children: loadingPlan ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-skel sg-skel--amt", "data-testid": "pay-loading-amount", "aria-hidden": "true" }) : sel && selectedVisible ? /* @__PURE__ */ jsxRuntime.jsx(AmountText, { value: groupDecimal(atLeastCents(sel.source.payAmount)) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-amt-empty", children: "\u2014" }) }),
6925
6997
  /* @__PURE__ */ jsxRuntime.jsx(
6926
6998
  TokenButton,
6927
6999
  {
@@ -6937,10 +7009,20 @@ function PayCard(props) {
6937
7009
  ] }),
6938
7010
  /* @__PURE__ */ jsxRuntime.jsx(PaneFoot, { usd: sel && selectedVisible ? usdOf(sel.source.payAmount, prices[selSymbol]) : null, balance: selBal ? shortBalance(selBal.formatted) : null })
6939
7011
  ] }),
7012
+ loadingPlan ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-pay-loading", "data-testid": "pay-loading", role: "status", children: [
7013
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-skel sg-skel--row" }),
7014
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-skel sg-skel--row" }),
7015
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-muted sg-pay-loading-line", children: [
7016
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-spinner", "aria-hidden": "true" }),
7017
+ " ",
7018
+ pricing ? "Pricing this option\u2026" : "Checking your balances and finding the best way to pay\u2026"
7019
+ ] })
7020
+ ] }) : null,
7021
+ pickError ? /* @__PURE__ */ jsxRuntime.jsx(StatusPanel, { tone: "error", children: pickError }) : null,
6940
7022
  flow.status === "error" && flow.error ? /* @__PURE__ */ jsxRuntime.jsx(StatusPanel, { tone: "error", children: flow.error }) : null,
6941
7023
  scannedEmpty ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-note", children: "None of your balances can cover this yet \u2014 pick a different asset to fund with." }) : null,
6942
7024
  flow.status === "ready" && !visibleRoutes.length ? /* @__PURE__ */ jsxRuntime.jsx(StatusPanel, { children: "No funding route matches the accepted assets for this payment." }) : null,
6943
- sel && flow.status !== "loading" ? /* @__PURE__ */ jsxRuntime.jsx(
7025
+ sel && !loadingPlan ? /* @__PURE__ */ jsxRuntime.jsx(
6944
7026
  DetailButton,
6945
7027
  {
6946
7028
  btnRef: complianceBtnRef,
@@ -6952,7 +7034,7 @@ function PayCard(props) {
6952
7034
  onClick: () => setSheet(true)
6953
7035
  }
6954
7036
  ) : null,
6955
- sel && selectedVisible && flow.status !== "loading" ? /* @__PURE__ */ jsxRuntime.jsx(RateBox, { rowsOnly: true, rate: null, fromSymbol: "", toTicker: "", rows: feeRows }) : null
7037
+ sel && selectedVisible && !loadingPlan ? /* @__PURE__ */ jsxRuntime.jsx(RateBox, { rowsOnly: true, rate: null, fromSymbol: "", toTicker: "", rows: feeRows }) : null
6956
7038
  ] }),
6957
7039
  submitting ? /* @__PURE__ */ jsxRuntime.jsx(StepList, { steps: flow.steps }) : null,
6958
7040
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-cta-wrap", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -6960,7 +7042,7 @@ function PayCard(props) {
6960
7042
  {
6961
7043
  onClick: parked || !selectedVisible ? void 0 : flow.submit,
6962
7044
  busy: submitting,
6963
- disabled: parked || !selectedVisible || flow.insufficient || !!flow.nativeShortfall || flow.status === "loading",
7045
+ disabled: parked || !selectedVisible || flow.insufficient || !!flow.nativeShortfall || loadingPlan,
6964
7046
  children: payLabel
6965
7047
  }
6966
7048
  ) })
@@ -7298,6 +7380,10 @@ function ExchangeCard(props) {
7298
7380
  }
7299
7381
  return states;
7300
7382
  }, [catalogue, fromToken]);
7383
+ const toPickerVisible = react.useMemo(
7384
+ () => destinationStates ? toPickerTokens.filter((t) => !destinationStates[`${Number(t.chainId)}:${String(t.address || "").toLowerCase()}`]?.disabled) : toPickerTokens,
7385
+ [toPickerTokens, destinationStates]
7386
+ );
7301
7387
  const normalizedAmount = normalizeDecimalText(amount);
7302
7388
  const amountValid = /^\d+(\.\d+)?$/.test(normalizedAmount) && Number(normalizedAmount) > 0 && Number(normalizedAmount) <= 1e9;
7303
7389
  const rampMode = mode !== "exchange";
@@ -7518,7 +7604,7 @@ function ExchangeCard(props) {
7518
7604
  {
7519
7605
  title: isFrom ? "Exchange from" : "Exchange to",
7520
7606
  chains,
7521
- tokens: isFrom ? fromPickerTokens : toPickerTokens,
7607
+ tokens: isFrom ? fromPickerTokens : toPickerVisible,
7522
7608
  balances,
7523
7609
  optionStates: isFrom ? void 0 : destinationStates,
7524
7610
  loading: !catalogue?.ready,
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeInput, b as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, c as PaymentIslandKind, d as PaymentIslandProps, e as PillOpenAs, S as SettlementMethod, f as StableGenieConfig, g as StableGenieExchange, h as StableGenieExchangeProps, i as StableGeniePay, j as StableGeniePayProps, k as StableGenieProvider, l as StableGenieRwaExchange, m as StableGenieSwap, n as StableGenieSwapProps, o as StableGenieTheme, p as SuccessInfo, q as SupportedAsset, r as darkTheme, s as lightTheme, t as mount, u as resolveTheme } from './mount-wJ7WrkOC.cjs';
1
+ export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeInput, b as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, c as PaymentIslandKind, d as PaymentIslandProps, e as PillOpenAs, S as SettlementMethod, f as StableGenieConfig, g as StableGenieExchange, h as StableGenieExchangeProps, i as StableGeniePay, j as StableGeniePayProps, k as StableGenieProvider, l as StableGenieRwaExchange, m as StableGenieSwap, n as StableGenieSwapProps, o as StableGenieTheme, p as SuccessInfo, q as SupportedAsset, r as darkTheme, s as lightTheme, t as mount, u as resolveTheme } from './mount-xruGixNZ.cjs';
2
2
  import * as react from 'react';
3
- import { C as Compliance } from './verify-QEs-XHri.cjs';
4
- export { A as Availability, B as BrokenLane, a as Catalogue, b as Chain, c as ComplianceCheck, d as ComplianceTone, e as ComplianceView, E as EngineConfig, f as ExchangeProduct, L as LaneLimit, P as Plan, R as Route, g as RouteLeg, h as RouteResult, S as SanitizedTxEntry, T as Token, i as TxHistoryEntry, V as VerifyResult, W as WalletScreen, j as assetClassOf, k as brokenLaneReason, l as complianceChecks, m as complianceControlsLine, n as complianceView, o as counterpartTokens, p as destinationAvailability, q as formatJurisdiction, r as humanizeComplianceReason } from './verify-QEs-XHri.cjs';
3
+ import { C as Compliance } from './verify-D8tr1yY1.cjs';
4
+ export { A as Availability, B as BrokenLane, a as Catalogue, b as Chain, c as ComplianceCheck, d as ComplianceTone, e as ComplianceView, E as EngineConfig, f as ExchangeProduct, L as LaneLimit, P as Plan, R as Route, g as RouteLeg, h as RouteResult, S as SanitizedTxEntry, T as Token, i as TxHistoryEntry, V as VerifyResult, W as WalletScreen, j as assetClassOf, k as brokenLaneReason, l as complianceChecks, m as complianceControlsLine, n as complianceView, o as counterpartTokens, p as destinationAvailability, q as formatJurisdiction, r as humanizeComplianceReason } from './verify-D8tr1yY1.cjs';
5
5
  export { EXECUTABLE_STABLE_ASSETS, Engine, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, createEngine, symbolKey } from './core/index.cjs';
6
6
 
7
7
  declare function CompliancePanel(props: {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeInput, b as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, c as PaymentIslandKind, d as PaymentIslandProps, e as PillOpenAs, S as SettlementMethod, f as StableGenieConfig, g as StableGenieExchange, h as StableGenieExchangeProps, i as StableGeniePay, j as StableGeniePayProps, k as StableGenieProvider, l as StableGenieRwaExchange, m as StableGenieSwap, n as StableGenieSwapProps, o as StableGenieTheme, p as SuccessInfo, q as SupportedAsset, r as darkTheme, s as lightTheme, t as mount, u as resolveTheme } from './mount-Bw7W3Bfk.js';
1
+ export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeInput, b as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, c as PaymentIslandKind, d as PaymentIslandProps, e as PillOpenAs, S as SettlementMethod, f as StableGenieConfig, g as StableGenieExchange, h as StableGenieExchangeProps, i as StableGeniePay, j as StableGeniePayProps, k as StableGenieProvider, l as StableGenieRwaExchange, m as StableGenieSwap, n as StableGenieSwapProps, o as StableGenieTheme, p as SuccessInfo, q as SupportedAsset, r as darkTheme, s as lightTheme, t as mount, u as resolveTheme } from './mount-hxb3zioQ.js';
2
2
  import * as react from 'react';
3
- import { C as Compliance } from './verify-QEs-XHri.js';
4
- export { A as Availability, B as BrokenLane, a as Catalogue, b as Chain, c as ComplianceCheck, d as ComplianceTone, e as ComplianceView, E as EngineConfig, f as ExchangeProduct, L as LaneLimit, P as Plan, R as Route, g as RouteLeg, h as RouteResult, S as SanitizedTxEntry, T as Token, i as TxHistoryEntry, V as VerifyResult, W as WalletScreen, j as assetClassOf, k as brokenLaneReason, l as complianceChecks, m as complianceControlsLine, n as complianceView, o as counterpartTokens, p as destinationAvailability, q as formatJurisdiction, r as humanizeComplianceReason } from './verify-QEs-XHri.js';
3
+ import { C as Compliance } from './verify-D8tr1yY1.js';
4
+ export { A as Availability, B as BrokenLane, a as Catalogue, b as Chain, c as ComplianceCheck, d as ComplianceTone, e as ComplianceView, E as EngineConfig, f as ExchangeProduct, L as LaneLimit, P as Plan, R as Route, g as RouteLeg, h as RouteResult, S as SanitizedTxEntry, T as Token, i as TxHistoryEntry, V as VerifyResult, W as WalletScreen, j as assetClassOf, k as brokenLaneReason, l as complianceChecks, m as complianceControlsLine, n as complianceView, o as counterpartTokens, p as destinationAvailability, q as formatJurisdiction, r as humanizeComplianceReason } from './verify-D8tr1yY1.js';
5
5
  export { EXECUTABLE_STABLE_ASSETS, Engine, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, createEngine, symbolKey } from './core/index.js';
6
6
 
7
7
  declare function CompliancePanel(props: {
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { CompliancePanel, PaymentIsland, StableGenieExchange, StableGeniePay, StableGenieProvider, StableGenieRwaExchange, StableGenieSwap, darkTheme, lightTheme, mount, resolveTheme } from './chunk-AWTQU6CW.js';
2
- export { EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, assetClassOf, brokenLaneReason, complianceChecks, complianceControlsLine, complianceView, counterpartTokens, createEngine, destinationAvailability, formatJurisdiction, humanizeComplianceReason, symbolKey } from './chunk-BOEY6DG5.js';
1
+ export { CompliancePanel, PaymentIsland, StableGenieExchange, StableGeniePay, StableGenieProvider, StableGenieRwaExchange, StableGenieSwap, darkTheme, lightTheme, mount, resolveTheme } from './chunk-TNAW2SWI.js';
2
+ export { EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, assetClassOf, brokenLaneReason, complianceChecks, complianceControlsLine, complianceView, counterpartTokens, createEngine, destinationAvailability, formatJurisdiction, humanizeComplianceReason, symbolKey } from './chunk-5WTRI2KO.js';
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-QEs-XHri.js';
3
+ import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-D8tr1yY1.js';
4
4
 
5
5
  interface Eip1193Provider {
6
6
  request(args: {
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-QEs-XHri.cjs';
3
+ import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-D8tr1yY1.cjs';
4
4
 
5
5
  interface Eip1193Provider {
6
6
  request(args: {