@glacislabs/stablegenie-zerodelta 4.22.0 → 4.22.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.
package/dist/index.cjs CHANGED
@@ -4521,7 +4521,7 @@ function compareAmount(value) {
4521
4521
  }
4522
4522
  function compareFeeUsd(option, fromUsd) {
4523
4523
  const centibips = option.feeCentibips;
4524
- if (centibips === void 0 || option.feeNative) return null;
4524
+ if (centibips === void 0) return null;
4525
4525
  if (centibips === 0) return 0;
4526
4526
  return typeof fromUsd === "number" && Number.isFinite(fromUsd) && fromUsd > 0 ? fromUsd * centibips / 1e6 : null;
4527
4527
  }
@@ -5037,7 +5037,7 @@ var CHANNEL_HEADER = "x-zd-channel";
5037
5037
  var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
5038
5038
  var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
5039
5039
  var WIDGET_CHANNEL = "widget";
5040
- var WIDGET_VERSION = "4.22.0" ;
5040
+ var WIDGET_VERSION = "4.22.2" ;
5041
5041
  var MAX_CHANNEL_VERSION_LEN = 32;
5042
5042
  function sanitizeVersion(raw2) {
5043
5043
  const v = String(raw2).trim();
@@ -14027,13 +14027,9 @@ function centibipsPct(centibips) {
14027
14027
  const frac = String(centibips % 1e4).padStart(4, "0").replace(/0+$/, "").padEnd(2, "0");
14028
14028
  return `${whole}.${frac}%`;
14029
14029
  }
14030
- function zeroDeltaFeeLabel(fee, native) {
14030
+ function zeroDeltaFeeLabel(fee) {
14031
14031
  const centibips = statedCentibips(fee);
14032
- if (centibips === null) return "--";
14033
- const pct = centibipsPct(centibips);
14034
- const raw2 = fee?.zeroDeltaFeeNative;
14035
- if (typeof raw2 !== "string" || !/^\d+$/.test(raw2) || BigInt(raw2) === 0n) return pct;
14036
- return `${pct} + ${formatUnits(raw2, native.decimals, 8)} ${native.symbol}`;
14032
+ return centibips === null ? "--" : centibipsPct(centibips);
14037
14033
  }
14038
14034
  function formatCostBps(bps) {
14039
14035
  const rounded = Number(bps.toFixed(1));
@@ -14393,7 +14389,9 @@ function ExchangeCard(props) {
14393
14389
  const nativeWei = (() => {
14394
14390
  try {
14395
14391
  if (selected) return routeNativeValue(selected);
14396
- return preview.data ? BigInt(preview.data.nativeFeeRaw || "0") : 0n;
14392
+ if (!preview.data) return 0n;
14393
+ const feeNative = preview.data.zeroDeltaFeeNative;
14394
+ return BigInt(preview.data.nativeFeeRaw || "0") + (typeof feeNative === "string" && /^\d+$/.test(feeNative) ? BigInt(feeNative) : 0n);
14397
14395
  } catch {
14398
14396
  return 0n;
14399
14397
  }
@@ -14409,8 +14407,7 @@ function ExchangeCard(props) {
14409
14407
  const fromUsd = usdOf2(normalizedAmount, prices[from?.symbol ?? ""]);
14410
14408
  const toUsd = usdOf2(receive, prices[to?.symbol ?? ""]);
14411
14409
  const statedFee = solActive ? solFlow.preview : addressed ? selected?.quote : preview.data;
14412
- const feeNative = solActive ? { symbol: "SOL", decimals: 9 } : { symbol: nativeSymbol(from?.chainId ?? 1, chains), decimals: 18 };
14413
- const feeLabel = hasQuote ? zeroDeltaFeeLabel(statedFee, feeNative) : "--";
14410
+ const feeLabel = hasQuote ? zeroDeltaFeeLabel(statedFee) : "--";
14414
14411
  const rateImpact = hasQuote ? rateImpactLabel(
14415
14412
  quoteCostBps({ send: normalizedAmount, receive, fromSymbol: from?.symbol, toSymbol: to?.symbol, fromPrice: prices[from?.symbol ?? ""], toPrice: prices[to?.symbol ?? ""] }),
14416
14413
  statedFee
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-DC_JT0cE.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-XNvmclF1.cjs';
2
2
  import * as react from 'react';
3
- import { C as Compliance } from './verify-mpglrU7n.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-mpglrU7n.cjs';
3
+ import { C as Compliance } from './verify-CrR7FBtq.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-CrR7FBtq.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
  interface SolanaWalletInfo {
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-GOYY_jNr.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-BaT3yd9W.js';
2
2
  import * as react from 'react';
3
- import { C as Compliance } from './verify-mpglrU7n.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-mpglrU7n.js';
3
+ import { C as Compliance } from './verify-CrR7FBtq.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-CrR7FBtq.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
  interface SolanaWalletInfo {
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { CompliancePanel, PaymentIsland, StableGenieExchange, StableGeniePay, StableGenieProvider, StableGenieRwaExchange, StableGenieSwap, connectSolanaWallet, darkTheme, disconnectSolanaWallet, discoverSolanaWallets, lightTheme, mount, onSolanaAccountChange, resolveTheme, solanaWalletSigner, useSolanaWallet, watchSolanaWallets } from './chunk-UBSZA63S.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-UIIH5O6G.js';
1
+ export { CompliancePanel, PaymentIsland, StableGenieExchange, StableGeniePay, StableGenieProvider, StableGenieRwaExchange, StableGenieSwap, connectSolanaWallet, darkTheme, disconnectSolanaWallet, discoverSolanaWallets, lightTheme, mount, onSolanaAccountChange, resolveTheme, solanaWalletSigner, useSolanaWallet, watchSolanaWallets } from './chunk-4DMHC52N.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-DGWYVLFC.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-mpglrU7n.js';
3
+ import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-CrR7FBtq.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-mpglrU7n.cjs';
3
+ import { P as Plan, V as VerifyResult, h as RouteResult, S as SanitizedTxEntry, f as ExchangeProduct } from './verify-CrR7FBtq.cjs';
4
4
 
5
5
  interface Eip1193Provider {
6
6
  request(args: {
package/dist/mount.cjs CHANGED
@@ -4502,7 +4502,7 @@ function compareAmount(value) {
4502
4502
  }
4503
4503
  function compareFeeUsd(option, fromUsd) {
4504
4504
  const centibips = option.feeCentibips;
4505
- if (centibips === void 0 || option.feeNative) return null;
4505
+ if (centibips === void 0) return null;
4506
4506
  if (centibips === 0) return 0;
4507
4507
  return typeof fromUsd === "number" && Number.isFinite(fromUsd) && fromUsd > 0 ? fromUsd * centibips / 1e6 : null;
4508
4508
  }
@@ -5018,7 +5018,7 @@ var CHANNEL_HEADER = "x-zd-channel";
5018
5018
  var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
5019
5019
  var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
5020
5020
  var WIDGET_CHANNEL = "widget";
5021
- var WIDGET_VERSION = "4.22.0" ;
5021
+ var WIDGET_VERSION = "4.22.2" ;
5022
5022
  var MAX_CHANNEL_VERSION_LEN = 32;
5023
5023
  function sanitizeVersion(raw2) {
5024
5024
  const v = String(raw2).trim();
@@ -14008,13 +14008,9 @@ function centibipsPct(centibips) {
14008
14008
  const frac = String(centibips % 1e4).padStart(4, "0").replace(/0+$/, "").padEnd(2, "0");
14009
14009
  return `${whole}.${frac}%`;
14010
14010
  }
14011
- function zeroDeltaFeeLabel(fee, native) {
14011
+ function zeroDeltaFeeLabel(fee) {
14012
14012
  const centibips = statedCentibips(fee);
14013
- if (centibips === null) return "--";
14014
- const pct = centibipsPct(centibips);
14015
- const raw2 = fee?.zeroDeltaFeeNative;
14016
- if (typeof raw2 !== "string" || !/^\d+$/.test(raw2) || BigInt(raw2) === 0n) return pct;
14017
- return `${pct} + ${formatUnits(raw2, native.decimals, 8)} ${native.symbol}`;
14013
+ return centibips === null ? "--" : centibipsPct(centibips);
14018
14014
  }
14019
14015
  function formatCostBps(bps) {
14020
14016
  const rounded = Number(bps.toFixed(1));
@@ -14374,7 +14370,9 @@ function ExchangeCard(props) {
14374
14370
  const nativeWei = (() => {
14375
14371
  try {
14376
14372
  if (selected) return routeNativeValue(selected);
14377
- return preview.data ? BigInt(preview.data.nativeFeeRaw || "0") : 0n;
14373
+ if (!preview.data) return 0n;
14374
+ const feeNative = preview.data.zeroDeltaFeeNative;
14375
+ return BigInt(preview.data.nativeFeeRaw || "0") + (typeof feeNative === "string" && /^\d+$/.test(feeNative) ? BigInt(feeNative) : 0n);
14378
14376
  } catch {
14379
14377
  return 0n;
14380
14378
  }
@@ -14390,8 +14388,7 @@ function ExchangeCard(props) {
14390
14388
  const fromUsd = usdOf2(normalizedAmount, prices[from?.symbol ?? ""]);
14391
14389
  const toUsd = usdOf2(receive, prices[to?.symbol ?? ""]);
14392
14390
  const statedFee = solActive ? solFlow.preview : addressed ? selected?.quote : preview.data;
14393
- const feeNative = solActive ? { symbol: "SOL", decimals: 9 } : { symbol: nativeSymbol(from?.chainId ?? 1, chains), decimals: 18 };
14394
- const feeLabel = hasQuote ? zeroDeltaFeeLabel(statedFee, feeNative) : "--";
14391
+ const feeLabel = hasQuote ? zeroDeltaFeeLabel(statedFee) : "--";
14395
14392
  const rateImpact = hasQuote ? rateImpactLabel(
14396
14393
  quoteCostBps({ send: normalizedAmount, receive, fromSymbol: from?.symbol, toSymbol: to?.symbol, fromPrice: prices[from?.symbol ?? ""], toPrice: prices[to?.symbol ?? ""] }),
14397
14394
  statedFee
package/dist/mount.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- export { M as MountConfig, t as mount } from './mount-DC_JT0cE.cjs';
1
+ export { M as MountConfig, t as mount } from './mount-XNvmclF1.cjs';
2
2
  import 'react';
3
- import './verify-mpglrU7n.cjs';
3
+ import './verify-CrR7FBtq.cjs';
package/dist/mount.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { M as MountConfig, t as mount } from './mount-GOYY_jNr.js';
1
+ export { M as MountConfig, t as mount } from './mount-BaT3yd9W.js';
2
2
  import 'react';
3
- import './verify-mpglrU7n.js';
3
+ import './verify-CrR7FBtq.js';
package/dist/mount.js CHANGED
@@ -1,2 +1,2 @@
1
- export { mount } from './chunk-UBSZA63S.js';
2
- import './chunk-UIIH5O6G.js';
1
+ export { mount } from './chunk-4DMHC52N.js';
2
+ import './chunk-DGWYVLFC.js';