@glacislabs/stablegenie-zerodelta 4.1.1 → 4.2.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
@@ -484,6 +484,29 @@ function applyLayerZeroBuffer(quote, option = {}) {
484
484
  return gas * (10000n + LZ_FEE_BUFFER_BPS) / 10000n;
485
485
  }
486
486
 
487
+ // src/core/ticker.ts
488
+ var DISPLAY_SAFE = /^[\p{L}\p{N}\p{Sc}.+_-]{1,16}$/u;
489
+ function foldTicker(value) {
490
+ return String(value ?? "").replace(/₮/g, "T").toUpperCase();
491
+ }
492
+ function safeTicker(ticker, symbol) {
493
+ const value = String(ticker ?? "").trim();
494
+ if (!value || !DISPLAY_SAFE.test(value)) return "";
495
+ const asset = foldTicker(symbol).trim();
496
+ if (!asset || !foldTicker(value).startsWith(asset)) return "";
497
+ return value;
498
+ }
499
+ function tokenTicker(token) {
500
+ if (!token) return "";
501
+ return safeTicker(token.displaySymbol, token.symbol) || String(token.symbol ?? "");
502
+ }
503
+ function tickerOn(tokens, chainId, symbol) {
504
+ if (!symbol || !chainId || !tokens?.length) return symbol;
505
+ const key = symbolKey(symbol);
506
+ const deployment = tokens.find((t) => Number(t.chainId) === Number(chainId) && symbolKey(t.symbol) === key);
507
+ return deployment ? tokenTicker(deployment) : symbol;
508
+ }
509
+
487
510
  // src/core/availability.ts
488
511
  function assetClassOf(symbol) {
489
512
  const key = symbolKey(symbol);
@@ -664,6 +687,7 @@ function buildPayOptions({ invoiceAsset, invoiceChainId, tokens, routes, chains,
664
687
  options.push({
665
688
  symbol: token.symbol,
666
689
  symbolKey: payKey,
690
+ ticker: tokenTicker(token),
667
691
  name: token.name || token.symbol,
668
692
  chainId,
669
693
  chainName: chainNameOf(chainId, chains),
@@ -1356,10 +1380,13 @@ function routeDeltaLabel(result, quote) {
1356
1380
  if (quote.feeBps) return `${quote.feeBps} bps fee`;
1357
1381
  return "~0";
1358
1382
  }
1383
+ function optionTicker(option) {
1384
+ return option.ticker || option.symbol;
1385
+ }
1359
1386
  function routeLabelFor(option, destinationToken, result) {
1360
1387
  if (result.directTransfer) return "Direct transfer: asset and chain already match.";
1361
1388
  const bridge = result.quote.bridge ? ` via ${result.quote.bridge}` : "";
1362
- return `Swap ${option.symbol} to ${destinationToken.symbol} and settle on ZeroDelta${bridge}.`;
1389
+ return `Swap ${optionTicker(option)} to ${tokenTicker(destinationToken)} and settle on ZeroDelta${bridge}.`;
1363
1390
  }
1364
1391
  function tokenAt(tokens, chainId, address) {
1365
1392
  const wanted = normalizeAddress(address);
@@ -1378,6 +1405,7 @@ function buildLegs(orders, ctx) {
1378
1405
  const legs = [];
1379
1406
  let fromChainId = ctx.option.chainId;
1380
1407
  let fromAsset = ctx.option.symbol;
1408
+ let fromTicker = optionTicker(ctx.option);
1381
1409
  let fromDecimals = ctx.option.decimals;
1382
1410
  for (let index = 0; index < orders.length; index += 1) {
1383
1411
  const order = orders[index];
@@ -1385,15 +1413,18 @@ function buildLegs(orders, ctx) {
1385
1413
  const toChainId = Number(order.destinationChainId);
1386
1414
  const askToken = isLast ? ctx.destinationToken : tokenAt(ctx.tokens, toChainId, order.askToken);
1387
1415
  const toAsset = isLast ? ctx.destinationToken.symbol : askToken?.symbol ?? "";
1416
+ const toTicker = askToken ? tokenTicker(askToken) : "";
1388
1417
  const toDecimals = askToken ? assetDecimals(askToken) : void 0;
1389
1418
  const executionChainId = Number(order.executionChainId);
1390
1419
  legs.push({
1391
1420
  index: index + 1,
1392
1421
  fromAsset,
1422
+ fromTicker,
1393
1423
  fromChainId,
1394
1424
  fromChainName: chainNameOf(fromChainId, ctx.chains),
1395
1425
  fromAmount: legAmount(order.bidTokenAmount, fromDecimals),
1396
1426
  toAsset,
1427
+ toTicker,
1397
1428
  toChainId,
1398
1429
  toChainName: chainNameOf(toChainId, ctx.chains),
1399
1430
  toAmount: legAmount(order.askTokenAmount, toDecimals),
@@ -1402,6 +1433,7 @@ function buildLegs(orders, ctx) {
1402
1433
  });
1403
1434
  fromChainId = toChainId;
1404
1435
  fromAsset = toAsset;
1436
+ fromTicker = toTicker;
1405
1437
  fromDecimals = toDecimals;
1406
1438
  }
1407
1439
  return legs;
@@ -1430,6 +1462,7 @@ async function buildRoute({
1430
1462
  state: "DIRECT",
1431
1463
  source: {
1432
1464
  asset: option.symbol,
1465
+ ticker: optionTicker(option),
1433
1466
  chainId: option.chainId,
1434
1467
  chainName: option.chainName,
1435
1468
  tokenAddress: option.address,
@@ -1439,6 +1472,7 @@ async function buildRoute({
1439
1472
  },
1440
1473
  receive: {
1441
1474
  asset: destinationToken.symbol,
1475
+ ticker: tokenTicker(destinationToken),
1442
1476
  chainId: Number(destination.chainId),
1443
1477
  chainName: chainNameOf(Number(destination.chainId), chains),
1444
1478
  tokenAddress: destinationToken.address,
@@ -1453,10 +1487,12 @@ async function buildRoute({
1453
1487
  {
1454
1488
  index: 1,
1455
1489
  fromAsset: option.symbol,
1490
+ fromTicker: optionTicker(option),
1456
1491
  fromChainId: option.chainId,
1457
1492
  fromChainName: option.chainName,
1458
1493
  fromAmount: sourceAmount,
1459
1494
  toAsset: destinationToken.symbol,
1495
+ toTicker: tokenTicker(destinationToken),
1460
1496
  toChainId: Number(destination.chainId),
1461
1497
  toChainName: chainNameOf(Number(destination.chainId), chains),
1462
1498
  toAmount: receiveAmount,
@@ -1468,7 +1504,7 @@ async function buildRoute({
1468
1504
  {
1469
1505
  id: "transfer",
1470
1506
  kind: "transfer",
1471
- label: `Transfer ${destinationToken.symbol}`,
1507
+ label: `Transfer ${tokenTicker(destinationToken)}`,
1472
1508
  chainId: option.chainId,
1473
1509
  to: option.address,
1474
1510
  data: encodeTransfer(destination.address, result.youPayRaw),
@@ -1520,6 +1556,7 @@ async function buildRoute({
1520
1556
  state: result.meetsTarget ? "ROUTE" : "SHORT",
1521
1557
  source: {
1522
1558
  asset: option.symbol,
1559
+ ticker: optionTicker(option),
1523
1560
  chainId: option.chainId,
1524
1561
  chainName: option.chainName,
1525
1562
  tokenAddress: option.address,
@@ -1529,6 +1566,7 @@ async function buildRoute({
1529
1566
  },
1530
1567
  receive: {
1531
1568
  asset: destinationToken.symbol,
1569
+ ticker: tokenTicker(destinationToken),
1532
1570
  chainId: Number(destination.chainId),
1533
1571
  chainName: chainNameOf(Number(destination.chainId), chains),
1534
1572
  tokenAddress: destinationToken.address,
@@ -1542,7 +1580,7 @@ async function buildRoute({
1542
1580
  {
1543
1581
  id: "approve",
1544
1582
  kind: "approve",
1545
- label: `Approve ${option.symbol}`,
1583
+ label: `Approve ${optionTicker(option)}`,
1546
1584
  chainId: option.chainId,
1547
1585
  to: option.address,
1548
1586
  data: encodeApprove(escrow, order.bidTokenAmount),
@@ -2009,6 +2047,7 @@ async function buildSwapPlan(api, swap, payer, wallet = {}) {
2009
2047
  const option = {
2010
2048
  symbol: sourceToken.symbol,
2011
2049
  symbolKey: symbolKey(sourceToken.symbol),
2050
+ ticker: tokenTicker(sourceToken),
2012
2051
  name: sourceToken.name || sourceToken.symbol,
2013
2052
  chainId: v.fromChainId,
2014
2053
  chainName: chainNameOf(v.fromChainId, chains),
@@ -2380,13 +2419,16 @@ function sanitizeLegs(legs) {
2380
2419
  if (!Array.isArray(legs) || !legs.length) return void 0;
2381
2420
  const text = (v, max) => String(v ?? "").slice(0, max);
2382
2421
  const chain = (v) => Number(v) || 0;
2422
+ const ticker = (value, asset) => safeTicker(value, asset) || void 0;
2383
2423
  return legs.slice(0, 8).map((leg, i) => ({
2384
2424
  index: Number(leg?.index) || i + 1,
2385
2425
  fromAsset: text(leg?.fromAsset, 12),
2426
+ fromTicker: ticker(leg?.fromTicker, text(leg?.fromAsset, 12)),
2386
2427
  fromChainId: chain(leg?.fromChainId),
2387
2428
  fromChainName: text(leg?.fromChainName, 40),
2388
2429
  fromAmount: text(leg?.fromAmount, 40),
2389
2430
  toAsset: text(leg?.toAsset, 12),
2431
+ toTicker: ticker(leg?.toTicker, text(leg?.toAsset, 12)),
2390
2432
  toChainId: chain(leg?.toChainId),
2391
2433
  toChainName: text(leg?.toChainName, 40),
2392
2434
  toAmount: text(leg?.toAmount, 40),
@@ -2403,6 +2445,8 @@ function sanitizeTxEntry(entry) {
2403
2445
  chainName: String(entry.chainName || "").slice(0, 40),
2404
2446
  fromAsset: String(entry.fromAsset || "").slice(0, 10),
2405
2447
  toAsset: String(entry.toAsset || "").slice(0, 10),
2448
+ fromTicker: safeTicker(entry.fromTicker, String(entry.fromAsset || "").slice(0, 10)) || void 0,
2449
+ toTicker: safeTicker(entry.toTicker, String(entry.toAsset || "").slice(0, 10)) || void 0,
2406
2450
  payAmount: String(entry.payAmount || "").slice(0, 40),
2407
2451
  receiveAmount: String(entry.receiveAmount || "").slice(0, 40),
2408
2452
  account: isAddress(entry.account) ? normalizeAddress(entry.account) : "",
@@ -2904,6 +2948,8 @@ function useFlow(args) {
2904
2948
  chainName: route.source.chainName,
2905
2949
  fromAsset: route.source.asset,
2906
2950
  toAsset: route.receive.asset,
2951
+ fromTicker: route.source.ticker,
2952
+ toTicker: route.receive.ticker,
2907
2953
  payAmount: route.source.payAmount,
2908
2954
  receiveAmount: route.receive.amount,
2909
2955
  account,
@@ -4241,7 +4287,7 @@ function ChevronGlyph() {
4241
4287
  return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" }) });
4242
4288
  }
4243
4289
  function TokenTile(props) {
4244
- const shown = props.token?.symbol ?? props.pick?.symbol ?? "";
4290
+ const shown = props.token ? tokenTicker(props.token) : props.pick?.symbol ?? "";
4245
4291
  const glyph = props.pick ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4246
4292
  /* @__PURE__ */ jsxRuntime.jsx(TokenGlyph, { symbol: props.pick.symbol, logoUrl: props.token?.logoUrl, chainId: props.pick.chainId }),
4247
4293
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sg-tile-text", children: [
@@ -4315,7 +4361,8 @@ function TokenSelect(props) {
4315
4361
  const q = query.trim().toLowerCase();
4316
4362
  const filtered = props.tokens.filter((t) => chainFilter == null ? true : Number(t.chainId) === chainFilter).filter((t) => {
4317
4363
  if (!q) return true;
4318
- return String(t.symbol || "").toLowerCase().includes(q) || String(t.name || "").toLowerCase().includes(q) || String(t.address || "").toLowerCase().includes(q) || // Chain name too (2026-09-08): with ~37 destination chains most have no bundled mark and
4364
+ return String(t.symbol || "").toLowerCase().includes(q) || // The chain's own ticker too, with `₮` read as `T`: "usdt0" finds USD₮0.
4365
+ foldTicker(tokenTicker(t)).includes(foldTicker(q)) || String(t.name || "").toLowerCase().includes(q) || String(t.address || "").toLowerCase().includes(q) || // Chain name too (2026-09-08): with ~37 destination chains most have no bundled mark and
4319
4366
  // show a three-letter badge, so "Katana" or "Berachain" has to be findable by typing it.
4320
4367
  String(CHAIN_LABELS[Number(t.chainId)] || "").toLowerCase().includes(q);
4321
4368
  });
@@ -4367,7 +4414,7 @@ function TokenSelect(props) {
4367
4414
  children: [
4368
4415
  /* @__PURE__ */ jsxRuntime.jsx(TokenGlyph, { symbol: t.symbol, logoUrl: t.logoUrl, chainId }),
4369
4416
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sg-tokrow-main", children: [
4370
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-tokrow-sym", children: t.symbol }),
4417
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-tokrow-sym", children: tokenTicker(t) }),
4371
4418
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-tokrow-name", children: t.name || t.symbol })
4372
4419
  ] }),
4373
4420
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sg-tokrow-end", children: [
@@ -4440,10 +4487,12 @@ function legsOf(entry) {
4440
4487
  const leg = {
4441
4488
  index: 1,
4442
4489
  fromAsset: entry.fromAsset,
4490
+ fromTicker: entry.fromTicker,
4443
4491
  fromChainId: entry.chainId ?? 0,
4444
4492
  fromChainName: entry.chainName,
4445
4493
  fromAmount: entry.payAmount,
4446
4494
  toAsset: entry.toAsset,
4495
+ toTicker: entry.toTicker,
4447
4496
  toChainId: 0,
4448
4497
  toChainName: "",
4449
4498
  toAmount: entry.receiveAmount,
@@ -4472,9 +4521,9 @@ function TxLegs(props) {
4472
4521
  multi ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-leg-n", "aria-hidden": "true", children: leg.index }) : null,
4473
4522
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-leg-body", children: [
4474
4523
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-leg-line", children: [
4475
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-mono", children: `${leg.fromAmount ? `${leg.fromAmount} ` : ""}${leg.fromAsset || "\u2014"}` }),
4524
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-mono", children: `${leg.fromAmount ? `${leg.fromAmount} ` : ""}${leg.fromTicker || leg.fromAsset || "\u2014"}` }),
4476
4525
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-leg-arrow", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(LegArrowGlyph, {}) }),
4477
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-mono", children: `${leg.toAmount ? `${leg.toAmount} ` : ""}${leg.toAsset || "\u2014"}` })
4526
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-mono", children: `${leg.toAmount ? `${leg.toAmount} ` : ""}${leg.toTicker || leg.toAsset || "\u2014"}` })
4478
4527
  ] }),
4479
4528
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-leg-sub", children: [
4480
4529
  chainName(leg.fromChainId, leg.fromChainName),
@@ -4520,10 +4569,10 @@ function TxPairGlyphs(props) {
4520
4569
  function TxPair(props) {
4521
4570
  const e = props.entry;
4522
4571
  return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sg-txrow-pair", children: [
4523
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-txrow-side sg-mono", children: `${e.payAmount} ${e.fromAsset}` }),
4572
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-txrow-side sg-mono", children: `${e.payAmount} ${e.fromTicker || e.fromAsset}` }),
4524
4573
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sg-txrow-side sg-mono", children: [
4525
4574
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sg-txrow-arrow", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(LegArrowGlyph, {}) }),
4526
- `${e.receiveAmount} ${e.toAsset}`
4575
+ `${e.receiveAmount} ${e.toTicker || e.toAsset}`
4527
4576
  ] })
4528
4577
  ] });
4529
4578
  }
@@ -4587,7 +4636,7 @@ function TxDetail(props) {
4587
4636
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-anchor sg-mono", children: [
4588
4637
  e.receiveAmount,
4589
4638
  " ",
4590
- e.toAsset
4639
+ e.toTicker || e.toAsset
4591
4640
  ] }),
4592
4641
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-anchor-sub", children: [
4593
4642
  e.kind === "payment" ? "Payment" : "Swap",
@@ -4604,7 +4653,7 @@ function TxDetail(props) {
4604
4653
  /* @__PURE__ */ jsxRuntime.jsxs("b", { className: "sg-mono", children: [
4605
4654
  e.payAmount,
4606
4655
  " ",
4607
- e.fromAsset
4656
+ e.fromTicker || e.fromAsset
4608
4657
  ] })
4609
4658
  ] }),
4610
4659
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-meta-row", children: [
@@ -5053,7 +5102,7 @@ function PaymentIsland(props) {
5053
5102
  zero = false;
5054
5103
  }
5055
5104
  if (zero) map[key] = { disabled: true, reason: "no-balance", hint: "No balance on this chain" };
5056
- else if (a.affordable === false) map[key] = { disabled: true, reason: "insufficient", hint: `Need ${a.route.source.payAmount} ${a.route.source.asset}` };
5105
+ else if (a.affordable === false) map[key] = { disabled: true, reason: "insufficient", hint: `Need ${a.route.source.payAmount} ${a.route.source.ticker || a.route.source.asset}` };
5057
5106
  else map[key] = { disabled: false };
5058
5107
  }
5059
5108
  return map;
@@ -5124,7 +5173,7 @@ function PaymentIsland(props) {
5124
5173
  if (verdict === "available") continue;
5125
5174
  states[key] = {
5126
5175
  disabled: true,
5127
- reason: verdict === "hub-only" ? `${token.symbol} cannot be delivered on this chain.` : "ZeroDelta cannot deliver this asset here.",
5176
+ reason: verdict === "hub-only" ? `${tokenTicker(token)} cannot be delivered on this chain.` : "ZeroDelta cannot deliver this asset here.",
5128
5177
  hint: verdict === "hub-only" ? "Not here" : "Unavailable"
5129
5178
  };
5130
5179
  }
@@ -5142,6 +5191,7 @@ function PaymentIsland(props) {
5142
5191
  list.push(
5143
5192
  reg ?? {
5144
5193
  symbol: r.source.asset,
5194
+ displaySymbol: r.source.ticker,
5145
5195
  name: r.source.asset,
5146
5196
  chainId: r.source.chainId,
5147
5197
  address: r.source.tokenAddress ?? "",
@@ -5274,10 +5324,11 @@ function PaymentIsland(props) {
5274
5324
  const selBal = sel ? holdings.balances[balanceKey(sel.source.chainId, sel.source.tokenAddress)] : void 0;
5275
5325
  const lastTxOwned = Boolean(flow.lastTxEntry?.hash && wallet.account && flow.lastTxEntry.account === wallet.account.toLowerCase());
5276
5326
  const mismatch = flow.status === "error" && flow.verdict?.status === "mismatch";
5277
- const destAsset = isPay ? props.toAsset : exToAsset;
5327
+ const destTicker = isPay ? tickerOn(registryTokens, props.toChainId, props.toAsset ?? "") : exToToken ? tokenTicker(exToToken) : exToAsset ?? "";
5328
+ const exFromTicker = exFromToken ? tokenTicker(exFromToken) : exFromAsset ?? "";
5278
5329
  const anchorAmount = sel?.receive.amount ?? (flow.status === "loading" ? "\u2026" : "\u2014");
5279
5330
  const successAmount = isPay ? props.amount : sel?.receive.amount;
5280
- const money = props.moneyDisplay ?? (isPay ? props.amount ? `${props.amount} ${props.toAsset}` : "" : exAmount ? `${exAmount} ${exFromAsset ?? ""}`.trim() : "");
5331
+ const money = props.moneyDisplay ?? (isPay ? props.amount ? `${props.amount} ${destTicker}` : "" : exAmount ? `${exAmount} ${exFromTicker}`.trim() : "");
5281
5332
  const verb = isPay ? { present: "Pay", gerund: "Paying", past: "Paid" } : kind === "swap" ? { present: "Swap", gerund: "Swapping", past: "Swapped" } : { present: "Exchange", gerund: "Exchanging", past: "Exchanged" };
5282
5333
  const paid = flow.status === "success";
5283
5334
  const settling = flow.status === "pending";
@@ -5332,7 +5383,7 @@ function PaymentIsland(props) {
5332
5383
  const liveMsg = flow.status === "loading" ? isPay ? "Finding the best way to pay." : "Finding the best route." : flow.status === "submitting" ? `${activeStep?.label ?? (isPay ? "Processing your payment" : `Processing your ${verb.present.toLowerCase()}`)} \u2014 in progress.` : flow.status === "success" || flow.status === "pending" ? flow.verdict?.status === "confirmed" ? isPay ? "Payment confirmed on-chain \u2014 the merchant has been settled." : `${verb.past} \u2014 confirmed on-chain.` : isPay ? "Payment sent \u2014 confirmation is still pending." : "Submitted \u2014 confirmation is still pending." : "";
5333
5384
  const loading = flow.status === "loading";
5334
5385
  const payReady = isPay ? Boolean(sel && selectedVisible) : Boolean(sel);
5335
- const ctaLabel = submitting ? isPay ? "Paying\u2026" : kind === "swap" ? "Swapping\u2026" : "Exchanging\u2026" : flow.insufficient ? "Insufficient balance" : flow.nativeShortfall ? flow.nativeShortfall : loading ? "Getting a price\u2026" : isPay ? sel && selectedVisible ? `Pay ${sel.source.payAmount} ${sel.source.asset}` : "Pay" : kind === "swap" ? "Swap" : "Exchange";
5386
+ const ctaLabel = submitting ? isPay ? "Paying\u2026" : kind === "swap" ? "Swapping\u2026" : "Exchanging\u2026" : flow.insufficient ? "Insufficient balance" : flow.nativeShortfall ? flow.nativeShortfall : loading ? "Getting a price\u2026" : isPay ? sel && selectedVisible ? `Pay ${sel.source.payAmount} ${sel.source.ticker || sel.source.asset}` : "Pay" : kind === "swap" ? "Swap" : "Exchange";
5336
5387
  const exPct = (p) => {
5337
5388
  if (!exFromBal || !exFromToken) return;
5338
5389
  const raw = BigInt(exFromBal.raw);
@@ -5354,7 +5405,7 @@ function PaymentIsland(props) {
5354
5405
  "Balance: ",
5355
5406
  exFromBal.formatted,
5356
5407
  " ",
5357
- exFrom?.symbol
5408
+ exFromTicker
5358
5409
  ] }) : null,
5359
5410
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-pct-row", role: "group", "aria-label": "Amount shortcuts", children: [25, 50, 75, 100].map((p) => /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "sg-pct", disabled: !exFromBal || submitting, onClick: () => exPct(p), children: p === 100 ? "MAX" : `${p}%` }, p)) })
5360
5411
  ] })
@@ -5420,7 +5471,7 @@ function PaymentIsland(props) {
5420
5471
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-label", children: "You receive (estimated)" }),
5421
5472
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-anchor sg-mono", children: [
5422
5473
  "\u2014 ",
5423
- exToAsset ?? ""
5474
+ destTicker
5424
5475
  ] }),
5425
5476
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-anchor-sub", children: "Connect your wallet to see the estimated receive amount." })
5426
5477
  ] })
@@ -5440,7 +5491,7 @@ function PaymentIsland(props) {
5440
5491
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-receipt-amt sg-mono", children: [
5441
5492
  successAmount,
5442
5493
  " ",
5443
- destAsset
5494
+ destTicker
5444
5495
  ] }),
5445
5496
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-receipt-sub", children: [
5446
5497
  confirmed ? "Confirmed on-chain" : "Confirmation pending",
@@ -5492,7 +5543,7 @@ function PaymentIsland(props) {
5492
5543
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-anchor sg-mono", children: [
5493
5544
  anchorAmount,
5494
5545
  " ",
5495
- destAsset
5546
+ destTicker
5496
5547
  ] })
5497
5548
  ] })
5498
5549
  ] }),
@@ -5536,7 +5587,7 @@ function PaymentIsland(props) {
5536
5587
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-anchor sg-mono", children: [
5537
5588
  sel.source.payAmount,
5538
5589
  " ",
5539
- sel.source.asset
5590
+ sel.source.ticker || sel.source.asset
5540
5591
  ] }),
5541
5592
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-anchor-sub", children: [
5542
5593
  "on ",
@@ -5549,7 +5600,7 @@ function PaymentIsland(props) {
5549
5600
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-anchor sg-mono", children: [
5550
5601
  sel.source.payAmount,
5551
5602
  " ",
5552
- sel.source.asset
5603
+ sel.source.ticker || sel.source.asset
5553
5604
  ] }),
5554
5605
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-anchor-sub", children: [
5555
5606
  "on ",
@@ -5704,7 +5755,7 @@ function StableGeniePay(props) {
5704
5755
  if (zero) {
5705
5756
  map[key] = { disabled: true, reason: "no-balance", hint: "No balance on this chain" };
5706
5757
  } else if (a.affordable === false) {
5707
- map[key] = { disabled: true, reason: "insufficient", hint: `Need ${a.route.source.payAmount} ${a.route.source.asset}` };
5758
+ map[key] = { disabled: true, reason: "insufficient", hint: `Need ${a.route.source.payAmount} ${a.route.source.ticker || a.route.source.asset}` };
5708
5759
  } else {
5709
5760
  map[key] = { disabled: false };
5710
5761
  }
@@ -5738,6 +5789,7 @@ function StableGeniePay(props) {
5738
5789
  list.push(
5739
5790
  reg ?? {
5740
5791
  symbol: r.source.asset,
5792
+ displaySymbol: r.source.ticker,
5741
5793
  name: r.source.asset,
5742
5794
  chainId: r.source.chainId,
5743
5795
  address: r.source.tokenAddress ?? "",
@@ -5811,12 +5863,12 @@ function StableGeniePay(props) {
5811
5863
  const sel = flow.selected;
5812
5864
  const selectedVisible = Boolean(sel && visibleRoutes.some((r) => r.id === sel.id));
5813
5865
  const selBal = sel ? holdings.balances[balanceKey(sel.source.chainId, sel.source.tokenAddress)] : void 0;
5814
- const why = parked ? "" : sel && selectedVisible ? sel.state === "DIRECT" ? `Direct ${sel.source.asset} transfer on ${CHAIN_LABELS[sel.source.chainId] || sel.source.chainName} \xB7 lowest cost` : (
5866
+ const why = parked ? "" : sel && selectedVisible ? sel.state === "DIRECT" ? `Direct ${sel.source.ticker || sel.source.asset} transfer on ${CHAIN_LABELS[sel.source.chainId] || sel.source.chainName} \xB7 lowest cost` : (
5815
5867
  // Deliberately does NOT restate the destination amount — that is merchant config, not a payer fact.
5816
5868
  `Routed through ZeroDelta \xB7 the extra covers the network cost`
5817
5869
  ) : "Pay with USDC, USDT, or USDE from your wallet.";
5818
5870
  const comingSoon = method === "card" ? "Card payments are coming soon. Today StableGenie pays from your connected wallet." : "Bank transfers are coming soon.";
5819
- const payLabel = parked ? method === "card" ? "Card \u2014 coming soon" : "Bank \u2014 coming soon" : submitting ? "Paying\u2026" : flow.insufficient ? "Insufficient balance" : flow.nativeShortfall ? flow.nativeShortfall : sel && selectedVisible ? `Pay ${sel.source.payAmount} ${sel.source.asset}` : "Pay";
5871
+ const payLabel = parked ? method === "card" ? "Card \u2014 coming soon" : "Bank \u2014 coming soon" : submitting ? "Paying\u2026" : flow.insufficient ? "Insufficient balance" : flow.nativeShortfall ? flow.nativeShortfall : sel && selectedVisible ? `Pay ${sel.source.payAmount} ${sel.source.ticker || sel.source.asset}` : "Pay";
5820
5872
  const walletSlot = wallet.account ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-head-tools", children: [
5821
5873
  /* @__PURE__ */ jsxRuntime.jsx(HistoryButton, { btnRef: histBtnRef, disabled: submitting, onClick: () => setHist({}) }),
5822
5874
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-brand", children: [
@@ -5845,7 +5897,7 @@ function StableGeniePay(props) {
5845
5897
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-success-amt sg-mono", children: [
5846
5898
  props.amount,
5847
5899
  " ",
5848
- props.toAsset
5900
+ tickerOn(registryTokens, props.toChainId, props.toAsset)
5849
5901
  ] }),
5850
5902
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-success-sub", children: [
5851
5903
  flow.verdict?.status === "confirmed" ? "Confirmed on-chain" : "Submitted \u2014 awaiting confirmation",
@@ -5881,7 +5933,7 @@ function StableGeniePay(props) {
5881
5933
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-anchor sg-mono", children: [
5882
5934
  sel.source.payAmount,
5883
5935
  " ",
5884
- sel.source.asset
5936
+ sel.source.ticker || sel.source.asset
5885
5937
  ] }),
5886
5938
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-anchor-sub", children: [
5887
5939
  "on ",
@@ -6007,7 +6059,7 @@ function StableGenieSwap(props) {
6007
6059
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-success-amt sg-mono", children: [
6008
6060
  receive,
6009
6061
  " ",
6010
- toAsset
6062
+ tickerOn(registryTokens, toChainId, toAsset)
6011
6063
  ] }),
6012
6064
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-success-sub", children: [
6013
6065
  flow.verdict?.status === "confirmed" ? "Confirmed on-chain" : "Submitted \u2014 awaiting confirmation",
@@ -6125,6 +6177,8 @@ function StableGenieExchange(props) {
6125
6177
  const fromToken = react.useMemo(() => from ? findToken(tokens, from.chainId, from.symbol) : null, [tokens, from]);
6126
6178
  const toToken = react.useMemo(() => to ? findToken(tokens, to.chainId, to.symbol) : null, [tokens, to]);
6127
6179
  const toSymbol = toToken?.symbol ?? to?.symbol ?? "";
6180
+ const fromTicker = fromToken ? tokenTicker(fromToken) : from?.symbol ?? "";
6181
+ const toTicker = toToken ? tokenTicker(toToken) : toSymbol;
6128
6182
  const fromPickerTokens = react.useMemo(() => product === "rwa" ? counterpartTokens(sourceTokens, toToken) : sourceTokens, [product, sourceTokens, toToken]);
6129
6183
  const toPickerTokens = react.useMemo(() => product === "rwa" ? counterpartTokens(tokens, fromToken) : tokens, [product, tokens, fromToken]);
6130
6184
  const rwaSeeded = react.useRef(false);
@@ -6152,7 +6206,7 @@ function StableGenieExchange(props) {
6152
6206
  if (verdict === "available") continue;
6153
6207
  states[key] = {
6154
6208
  disabled: true,
6155
- reason: verdict === "hub-only" ? `${token.symbol} cannot be delivered on this chain \u2014 choose an execution chain.` : "ZeroDelta cannot deliver this asset here.",
6209
+ reason: verdict === "hub-only" ? `${tokenTicker(token)} cannot be delivered on this chain \u2014 choose an execution chain.` : "ZeroDelta cannot deliver this asset here.",
6156
6210
  hint: verdict === "hub-only" ? "Not here" : "Unavailable"
6157
6211
  };
6158
6212
  }
@@ -6274,7 +6328,7 @@ function StableGenieExchange(props) {
6274
6328
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-success-amt sg-mono", children: [
6275
6329
  receive,
6276
6330
  " ",
6277
- toSymbol
6331
+ toTicker
6278
6332
  ] }),
6279
6333
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-success-sub", children: [
6280
6334
  flow.verdict?.status === "confirmed" ? "Confirmed on-chain" : "Submitted \u2014 awaiting confirmation",
@@ -6303,7 +6357,7 @@ function StableGenieExchange(props) {
6303
6357
  "Balance: ",
6304
6358
  fromBal.formatted,
6305
6359
  " ",
6306
- from?.symbol
6360
+ fromTicker
6307
6361
  ] }) : null,
6308
6362
  mode !== "onramp" ? (
6309
6363
  // a11y note: <fieldset> carries UA styling that would
@@ -6315,7 +6369,7 @@ function StableGenieExchange(props) {
6315
6369
  !rampMode && quoteError && !wide ? /* @__PURE__ */ jsxRuntime.jsx(StatusPanel, { tone: "error", children: quoteError }) : null,
6316
6370
  !rampMode && !wide && quotable && !quoteError ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-panel", style: { marginTop: 12 }, children: [
6317
6371
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-label", children: "You receive (estimated)" }),
6318
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-anchor sg-mono", children: quoting ? "\u2026" : receive ? `${receive} ${toSymbol}` : "\u2014" }),
6372
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sg-anchor sg-mono", children: quoting ? "\u2026" : receive ? `${receive} ${toTicker}` : "\u2014" }),
6319
6373
  meta && !quoting ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-recv-sub", children: [
6320
6374
  "via ",
6321
6375
  meta.bridge,
@@ -6364,7 +6418,7 @@ function StableGenieExchange(props) {
6364
6418
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-recv-amt sg-mono", children: [
6365
6419
  receive,
6366
6420
  " ",
6367
- toSymbol
6421
+ toTicker
6368
6422
  ] }),
6369
6423
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-recv-sub", children: [
6370
6424
  "on ",
@@ -6376,7 +6430,7 @@ function StableGenieExchange(props) {
6376
6430
  /* @__PURE__ */ jsxRuntime.jsxs("b", { className: "sg-mono", children: [
6377
6431
  normalizedAmount,
6378
6432
  " ",
6379
- from?.symbol
6433
+ fromTicker
6380
6434
  ] })
6381
6435
  ] }),
6382
6436
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sg-meta-row", children: [
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, S as SettlementMethod, d as StableGenieConfig, e as StableGenieExchange, f as StableGenieExchangeProps, g as StableGeniePay, h as StableGeniePayProps, i as StableGenieProvider, j as StableGenieRwaExchange, k as StableGenieSwap, l as StableGenieSwapProps, m as StableGenieTheme, n as SuccessInfo, o as SupportedAsset, p as darkTheme, q as lightTheme, r as mount, s as resolveTheme } from './mount-Dz9LffFx.cjs';
1
+ export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, S as SettlementMethod, d as StableGenieConfig, e as StableGenieExchange, f as StableGenieExchangeProps, g as StableGeniePay, h as StableGeniePayProps, i as StableGenieProvider, j as StableGenieRwaExchange, k as StableGenieSwap, l as StableGenieSwapProps, m as StableGenieTheme, n as SuccessInfo, o as SupportedAsset, p as darkTheme, q as lightTheme, r as mount, s as resolveTheme } from './mount-Dtbtdry1.cjs';
2
2
  import * as react from 'react';
3
- import { C as Compliance } from './verify-Bdw8-YWZ.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, 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 humanizeComplianceReason } from './verify-Bdw8-YWZ.cjs';
3
+ import { C as Compliance } from './verify-57gjg_dM.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, 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 humanizeComplianceReason } from './verify-57gjg_dM.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 ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, S as SettlementMethod, d as StableGenieConfig, e as StableGenieExchange, f as StableGenieExchangeProps, g as StableGeniePay, h as StableGeniePayProps, i as StableGenieProvider, j as StableGenieRwaExchange, k as StableGenieSwap, l as StableGenieSwapProps, m as StableGenieTheme, n as SuccessInfo, o as SupportedAsset, p as darkTheme, q as lightTheme, r as mount, s as resolveTheme } from './mount-CoLgvvsE.js';
1
+ export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, S as SettlementMethod, d as StableGenieConfig, e as StableGenieExchange, f as StableGenieExchangeProps, g as StableGeniePay, h as StableGeniePayProps, i as StableGenieProvider, j as StableGenieRwaExchange, k as StableGenieSwap, l as StableGenieSwapProps, m as StableGenieTheme, n as SuccessInfo, o as SupportedAsset, p as darkTheme, q as lightTheme, r as mount, s as resolveTheme } from './mount-Bver3O2z.js';
2
2
  import * as react from 'react';
3
- import { C as Compliance } from './verify-Bdw8-YWZ.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, 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 humanizeComplianceReason } from './verify-Bdw8-YWZ.js';
3
+ import { C as Compliance } from './verify-57gjg_dM.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, 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 humanizeComplianceReason } from './verify-57gjg_dM.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-6BYXMDVN.js';
2
- export { EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, assetClassOf, brokenLaneReason, complianceChecks, complianceControlsLine, complianceView, counterpartTokens, createEngine, destinationAvailability, humanizeComplianceReason, symbolKey } from './chunk-MQ4XLBVF.js';
1
+ export { CompliancePanel, PaymentIsland, StableGenieExchange, StableGeniePay, StableGenieProvider, StableGenieRwaExchange, StableGenieSwap, darkTheme, lightTheme, mount, resolveTheme } from './chunk-KETGKV7Y.js';
2
+ export { EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, assetClassOf, brokenLaneReason, complianceChecks, complianceControlsLine, complianceView, counterpartTokens, createEngine, destinationAvailability, humanizeComplianceReason, symbolKey } from './chunk-ZBUK7ULN.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-Bdw8-YWZ.js';
3
+ import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-57gjg_dM.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-Bdw8-YWZ.cjs';
3
+ import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-57gjg_dM.cjs';
4
4
 
5
5
  interface Eip1193Provider {
6
6
  request(args: {