@dhedge/trading-widget 6.3.2 → 6.3.3

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/index.js CHANGED
@@ -9,8 +9,8 @@ import { usePopperTooltip as Nc } from "react-popper-tooltip";
9
9
  import { createContext as he, useMemo as _, useContext as ge, useReducer as Dn, useCallback as b, useState as F, useEffect as I, forwardRef as Oc, useRef as pe, Children as _c, isValidElement as Pc, Fragment as Dc } from "react";
10
10
  import { ChevronDownIcon as ns, ArrowDownIcon as kc, ArrowPathIcon as Lc, CheckIcon as tn } from "@heroicons/react/24/solid";
11
11
  import { XMarkIcon as rs, ChevronLeftIcon as Rc } from "@heroicons/react/16/solid";
12
- import { k as St, ai as kn, aj as $c, a1 as Bc, A as Mc, B as Z, a0 as os, ak as W, q as Fc, al as as, _ as Ln, L as Wc, am as z, a8 as Uc, a7 as tt, N as Lo, an as oe, D as vt, M as gt, w as gn, ao as zc, ap as Qt, V as Gc, O as jr, a9 as Hc, P as Vc, R as jc, o as qc, aq as Ro, f as Kc, g as Yc, ab as $o, l as Qc, e as Xc, a2 as Zc, b as Jc, h as ed, ar as td, n as nd, z as ss, y as qr, m as mr, ag as rd, s as od, af as ad, p as sd, a5 as is, E as Bo, a4 as id, v as wr, j as Mo, a3 as ld, ad as cd, as as ls, aa as cs, U as ds, G as ps, H as dd, x as us, $ as ms, i as pd, at as Ve, au as ud, Q as ws, a6 as hs, av as Kr, aw as md, S as Fo, J as wd, I as hd, W as gd, X as fd, K as vd, u as bd } from "./contract-error-log-Ci0TIrO5.js";
13
- import { ax as GO, ay as HO, ah as VO } from "./contract-error-log-Ci0TIrO5.js";
12
+ import { k as St, ai as kn, aj as $c, a1 as Bc, A as Mc, B as Z, a0 as os, ak as W, q as Fc, al as as, _ as Ln, L as Wc, am as z, a8 as Uc, a7 as tt, N as Lo, an as oe, D as vt, M as gt, w as gn, ao as zc, ap as Qt, V as Gc, O as jr, a9 as Hc, P as Vc, R as jc, o as qc, aq as Ro, f as Kc, g as Yc, ab as $o, l as Qc, e as Xc, a2 as Zc, b as Jc, h as ed, ar as td, n as nd, z as ss, y as qr, m as mr, ag as rd, s as od, af as ad, p as sd, a5 as is, E as Bo, a4 as id, v as wr, j as Mo, a3 as ld, ad as cd, as as ls, aa as cs, U as ds, G as ps, H as dd, x as us, $ as ms, i as pd, at as Ve, au as ud, Q as ws, a6 as hs, av as Kr, aw as md, S as Fo, J as wd, I as hd, W as gd, X as fd, K as vd, u as bd } from "./contract-error-log-CbE2J5kb.js";
13
+ import { ax as GO, ay as HO, ah as VO } from "./contract-error-log-CbE2J5kb.js";
14
14
  import { i as yd, a4 as Td, a as O, q as H, H as Ad, p as Rn, S as Wo, T as Sd, a0 as fn, t as Uo, k as xd, r as Cd, ac as Ed, ab as Le, m as Id, u as gs, n as Nd, j as Od, x as fs, ai as at, b as jt, aC as qe, aD as je, aE as rt, aF as ft, v as _d, B as vs, $ as Ne, aG as hr, O as bs, J as Pd, at as Xt, a8 as Dd, aH as kd, aI as zo, g as ys, ah as bt, a1 as Ce, aJ as Ld, K as yt, ax as Je, aK as Rd, aL as Ts, o as $d, F as As, I as Ss, l as Bd, G as Md, am as Fd, al as Wd, D as Ud, aM as zd, a2 as _e, z as ze, L as Gd, ag as Yr, s as xs, ad as Hd, a7 as Vd, y as Cs, aw as Gt, w as Es, E as jd, an as Is, c as Ns, af as qd, Y as Kd, ak as Os, aN as _s, a9 as Yd, a6 as Qd, aO as Xd } from "./gmx-Cyz_GmV5.js";
15
15
  import { A as qO, aP as KO, aQ as YO, aR as QO, aS as XO, aT as ZO, aU as JO, C as e_, e as t_, aV as n_, aW as r_, f as o_, h as a_, U as s_, V as i_, aX as l_, aY as c_, a3 as d_, aZ as p_, aa as u_, a_ as m_, a$ as w_, b0 as h_, b1 as g_, b2 as f_, b3 as v_, b4 as b_, b5 as y_, b6 as T_, aB as A_, aA as S_, az as x_, ay as C_, b7 as E_, b8 as I_, b9 as N_, ba as O_, bb as __, bc as P_, bd as D_, be as k_, bf as L_, bg as R_, bh as $_, bi as B_, bj as M_, bk as F_, bl as W_, bm as U_, bn as z_, bo as G_, bp as H_, ao as V_, ap as j_ } from "./gmx-Cyz_GmV5.js";
16
16
  import { CustomError as Ps } from "ts-custom-error";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhedge/trading-widget",
3
- "version": "6.3.2",
3
+ "version": "6.3.3",
4
4
  "dependencies": {
5
5
  "@headlessui/react": "^2.1.2",
6
6
  "@heroicons/react": "^2.1.5",
package/utils.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./contract-error-log-D3UONUXl.cjs"),t=require("viem");exports.EMPTY_PER_ASSET_WITHDRAW_DATA=e.EMPTY_PER_ASSET_WITHDRAW_DATA;exports.THIRD_PARTY_CONTRACT_ERRORS=e.THIRD_PARTY_CONTRACT_ERRORS;exports.applyContractErrorRegistry=e.applyContractErrorRegistry;exports.base64ToHex=e.base64ToHex;exports.buildAaveWithdrawAssetTransactionData=e.buildAaveWithdrawAssetTransactionData;exports.buildComplexAssetDataForRouter=e.buildComplexAssetDataForRouter;exports.buildDytmActions=e.buildDytmActions;exports.buildDytmOutputAssetWithdrawAction=e.buildDytmOutputAssetWithdrawAction;exports.buildDytmRepayActions=e.buildDytmRepayActions;exports.buildSwapQuoteKeyForAave=e.buildSwapQuoteKeyForAave;exports.buildSwapWithdrawTransactionData=e.buildSwapWithdrawTransactionData;exports.buildZapDepositTransactionArguments=e.buildZapDepositTransactionArguments;exports.clientSide=e.clientSide;exports.computeAmountOutMinimumUsdc=e.computeAmountOutMinimumUsdc;exports.createDefaultComplexAssetData=e.createDefaultComplexAssetData;exports.encodeOndoWithdrawData=e.encodeOndoWithdrawData;exports.encodeUnwindPlan=e.encodeUnwindPlan;exports.enrichAssetsWithSwapQuotes=e.enrichAssetsWithSwapQuotes;exports.ensureContractErrorRegistryLoaded=e.ensureContractErrorRegistryLoaded;exports.ensureHexPrefix=e.ensureHexPrefix;exports.extractAvailableRouterKeys=e.extractAvailableRouterKeys;exports.fetchContractErrorRegistry=e.fetchContractErrorRegistry;exports.formatBalance=e.formatBalance;exports.formatByCurrency=e.formatByCurrency;exports.formatNumeratorToPercentage=e.formatNumeratorToPercentage;exports.formatTokenBalance=e.formatTokenBalance;exports.getAutoSlippageSimulationCandidates=e.getAutoSlippageSimulationCandidates;exports.getComplexAssetDataSlippageTolerance=e.getComplexAssetDataSlippageTolerance;exports.getContractAbiById=e.getContractAbiById;exports.getContractAddressById=e.getContractAddressById;exports.getContractErrorRegistry=e.getContractErrorRegistry;exports.getConventionalTokenPriceDecimals=e.getConventionalTokenPriceDecimals;exports.getErrorKey=e.getErrorKey;exports.getFlatMoneyCollateralByLeverageAddress=e.getFlatMoneyCollateralByLeverageAddress;exports.getFlatMoneyLinkByUnitAddress=e.getFlatMoneyLinkByUnitAddress;exports.getGmxWithdrawAssetByLeverageAddress=e.getGmxWithdrawAssetByLeverageAddress;exports.getGmxWithdrawAssetByVaultAddress=e.getGmxWithdrawAssetByVaultAddress;exports.getHyperliquidWithdrawAsset=e.getHyperliquidWithdrawAsset;exports.getNativeTokenInvestableBalance=e.getNativeTokenInvestableBalance;exports.getPercent=e.getPercent;exports.getPoolFraction=e.getPoolFraction;exports.getSettleDelay=e.getSettleDelay;exports.getSlippageToleranceForContractTransaction=e.getSlippageToleranceForContractTransaction;exports.getTxHashShort=e.getTxHashShort;exports.groupPreviewByAccount=e.groupPreviewByAccount;exports.isAaveLendAndBorrowAsset=e.isAaveLendAndBorrowAsset;exports.isFlatMoneyLeveragedAsset=e.isFlatMoneyLeveragedAsset;exports.isFmpAirdropVaultAddress=e.isFmpAirdropVaultAddress;exports.isGmxLeveragedAsset=e.isGmxLeveragedAsset;exports.isHyperliquidCorePositionAsset=e.isHyperliquidCorePositionAsset;exports.isHyperliquidPerpsAsset=e.isHyperliquidPerpsAsset;exports.isHyperliquidSpotSystemAsset=e.isHyperliquidSpotSystemAsset;exports.isNativeToken=e.isNativeToken;exports.isStableSymbol=e.isStableSymbol;exports.logContractErrorOnce=e.logContractErrorOnce;exports.logTransactionByActionType=e.logTransactionByActionType;exports.mapAttestationToOndoQuote=e.mapAttestationToOndoQuote;exports.mapOndoApiResponseToUpdatePricesArgs=e.mapOndoApiResponseToUpdatePricesArgs;exports.overlayWithdrawData=e.overlayWithdrawData;exports.parseAmountToD18=e.parseAmountToD18;exports.parseContractErrorMessage=e.parseContractErrorMessage;exports.shiftBy=e.shiftBy;exports.shortenAddress=e.shortenAddress;exports.shouldSwallowMainnetPollError=e.shouldSwallowMainnetPollError;exports.sliceByIndex=e.sliceByIndex;exports.toBigInt=e.toBigInt;exports.toBytes32Hex=e.toBytes32Hex;exports.transformAddressForAnalytics=e.transformAddressForAnalytics;exports.truncateString=e.truncateString;exports.tryEstimateWithRouters=e.tryEstimateWithRouters;exports.tryEstimateWithSlippageValues=e.tryEstimateWithSlippageValues;exports.validateLoggerEventParams=e.validateLoggerEventParams;Object.defineProperty(exports,"decodeErrorResult",{enumerable:!0,get:()=>t.decodeErrorResult});Object.defineProperty(exports,"encodeFunctionData",{enumerable:!0,get:()=>t.encodeFunctionData});Object.defineProperty(exports,"formatEther",{enumerable:!0,get:()=>t.formatEther});Object.defineProperty(exports,"formatUnits",{enumerable:!0,get:()=>t.formatUnits});Object.defineProperty(exports,"hexToString",{enumerable:!0,get:()=>t.hexToString});Object.defineProperty(exports,"trim",{enumerable:!0,get:()=>t.trim});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./contract-error-log-CNIRNvc6.cjs"),t=require("viem");exports.EMPTY_PER_ASSET_WITHDRAW_DATA=e.EMPTY_PER_ASSET_WITHDRAW_DATA;exports.THIRD_PARTY_CONTRACT_ERRORS=e.THIRD_PARTY_CONTRACT_ERRORS;exports.applyContractErrorRegistry=e.applyContractErrorRegistry;exports.base64ToHex=e.base64ToHex;exports.buildAaveWithdrawAssetTransactionData=e.buildAaveWithdrawAssetTransactionData;exports.buildComplexAssetDataForRouter=e.buildComplexAssetDataForRouter;exports.buildDytmActions=e.buildDytmActions;exports.buildDytmOutputAssetWithdrawAction=e.buildDytmOutputAssetWithdrawAction;exports.buildDytmRepayActions=e.buildDytmRepayActions;exports.buildSwapQuoteKeyForAave=e.buildSwapQuoteKeyForAave;exports.buildSwapWithdrawTransactionData=e.buildSwapWithdrawTransactionData;exports.buildZapDepositTransactionArguments=e.buildZapDepositTransactionArguments;exports.clientSide=e.clientSide;exports.computeAmountOutMinimumUsdc=e.computeAmountOutMinimumUsdc;exports.createDefaultComplexAssetData=e.createDefaultComplexAssetData;exports.encodeOndoWithdrawData=e.encodeOndoWithdrawData;exports.encodeUnwindPlan=e.encodeUnwindPlan;exports.enrichAssetsWithSwapQuotes=e.enrichAssetsWithSwapQuotes;exports.ensureContractErrorRegistryLoaded=e.ensureContractErrorRegistryLoaded;exports.ensureHexPrefix=e.ensureHexPrefix;exports.extractAvailableRouterKeys=e.extractAvailableRouterKeys;exports.fetchContractErrorRegistry=e.fetchContractErrorRegistry;exports.formatBalance=e.formatBalance;exports.formatByCurrency=e.formatByCurrency;exports.formatNumeratorToPercentage=e.formatNumeratorToPercentage;exports.formatTokenBalance=e.formatTokenBalance;exports.getAutoSlippageSimulationCandidates=e.getAutoSlippageSimulationCandidates;exports.getComplexAssetDataSlippageTolerance=e.getComplexAssetDataSlippageTolerance;exports.getContractAbiById=e.getContractAbiById;exports.getContractAddressById=e.getContractAddressById;exports.getContractErrorRegistry=e.getContractErrorRegistry;exports.getConventionalTokenPriceDecimals=e.getConventionalTokenPriceDecimals;exports.getErrorKey=e.getErrorKey;exports.getFlatMoneyCollateralByLeverageAddress=e.getFlatMoneyCollateralByLeverageAddress;exports.getFlatMoneyLinkByUnitAddress=e.getFlatMoneyLinkByUnitAddress;exports.getGmxWithdrawAssetByLeverageAddress=e.getGmxWithdrawAssetByLeverageAddress;exports.getGmxWithdrawAssetByVaultAddress=e.getGmxWithdrawAssetByVaultAddress;exports.getHyperliquidWithdrawAsset=e.getHyperliquidWithdrawAsset;exports.getNativeTokenInvestableBalance=e.getNativeTokenInvestableBalance;exports.getPercent=e.getPercent;exports.getPoolFraction=e.getPoolFraction;exports.getSettleDelay=e.getSettleDelay;exports.getSlippageToleranceForContractTransaction=e.getSlippageToleranceForContractTransaction;exports.getTxHashShort=e.getTxHashShort;exports.groupPreviewByAccount=e.groupPreviewByAccount;exports.isAaveLendAndBorrowAsset=e.isAaveLendAndBorrowAsset;exports.isFlatMoneyLeveragedAsset=e.isFlatMoneyLeveragedAsset;exports.isFmpAirdropVaultAddress=e.isFmpAirdropVaultAddress;exports.isGmxLeveragedAsset=e.isGmxLeveragedAsset;exports.isHyperliquidCorePositionAsset=e.isHyperliquidCorePositionAsset;exports.isHyperliquidPerpsAsset=e.isHyperliquidPerpsAsset;exports.isHyperliquidSpotSystemAsset=e.isHyperliquidSpotSystemAsset;exports.isNativeToken=e.isNativeToken;exports.isStableSymbol=e.isStableSymbol;exports.logContractErrorOnce=e.logContractErrorOnce;exports.logTransactionByActionType=e.logTransactionByActionType;exports.mapAttestationToOndoQuote=e.mapAttestationToOndoQuote;exports.mapOndoApiResponseToUpdatePricesArgs=e.mapOndoApiResponseToUpdatePricesArgs;exports.overlayWithdrawData=e.overlayWithdrawData;exports.parseAmountToD18=e.parseAmountToD18;exports.parseContractErrorMessage=e.parseContractErrorMessage;exports.shiftBy=e.shiftBy;exports.shortenAddress=e.shortenAddress;exports.shouldSwallowMainnetPollError=e.shouldSwallowMainnetPollError;exports.sliceByIndex=e.sliceByIndex;exports.toBigInt=e.toBigInt;exports.toBytes32Hex=e.toBytes32Hex;exports.transformAddressForAnalytics=e.transformAddressForAnalytics;exports.truncateString=e.truncateString;exports.tryEstimateWithRouters=e.tryEstimateWithRouters;exports.tryEstimateWithSlippageValues=e.tryEstimateWithSlippageValues;exports.validateLoggerEventParams=e.validateLoggerEventParams;Object.defineProperty(exports,"decodeErrorResult",{enumerable:!0,get:()=>t.decodeErrorResult});Object.defineProperty(exports,"encodeFunctionData",{enumerable:!0,get:()=>t.encodeFunctionData});Object.defineProperty(exports,"formatEther",{enumerable:!0,get:()=>t.formatEther});Object.defineProperty(exports,"formatUnits",{enumerable:!0,get:()=>t.formatUnits});Object.defineProperty(exports,"hexToString",{enumerable:!0,get:()=>t.hexToString});Object.defineProperty(exports,"trim",{enumerable:!0,get:()=>t.trim});
package/utils.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as s, T as t, a as r, b as o, c as i, d as n, e as d, f as l, g as c, h as A, i as g, j as u, k as p, l as y, m, n as T, o as h, p as S, q as C, r as D, s as R, t as B, u as E, v, w, x, y as b, z as P, A as f, B as W, C as F, D as H, F as L, G as O, H as I, I as M, J as _, K as k, L as U, M as q, N, O as G, P as K, Q, R as V, S as Y, U as Z, V as j, W as z, X as J, Y as X, Z as $, _ as aa, $ as ea, a0 as sa, a1 as ta, a2 as ra, a3 as oa, a4 as ia, a5 as na, a6 as da, a7 as la, a8 as ca, a9 as Aa, aa as ga, ab as ua, ac as pa, ad as ya, ae as ma, af as Ta, ag as ha, ah as Sa } from "./contract-error-log-Ci0TIrO5.js";
1
+ import { E as s, T as t, a as r, b as o, c as i, d as n, e as d, f as l, g as c, h as A, i as g, j as u, k as p, l as y, m, n as T, o as h, p as S, q as C, r as D, s as R, t as B, u as E, v, w, x, y as b, z as P, A as f, B as W, C as F, D as H, F as L, G as O, H as I, I as M, J as _, K as k, L as U, M as q, N, O as G, P as K, Q, R as V, S as Y, U as Z, V as j, W as z, X as J, Y as X, Z as $, _ as aa, $ as ea, a0 as sa, a1 as ta, a2 as ra, a3 as oa, a4 as ia, a5 as na, a6 as da, a7 as la, a8 as ca, a9 as Aa, aa as ga, ab as ua, ac as pa, ad as ya, ae as ma, af as Ta, ag as ha, ah as Sa } from "./contract-error-log-CbE2J5kb.js";
2
2
  import { decodeErrorResult as Da, encodeFunctionData as Ra, formatEther as Ba, formatUnits as Ea, hexToString as va, trim as wa } from "viem";
3
3
  export {
4
4
  s as EMPTY_PER_ASSET_WITHDRAW_DATA,