@dhedge/trading-widget 3.3.10 → 3.3.12

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.
@@ -36599,16 +36599,19 @@ const MG = () => {
36599
36599
  const U = await f({
36600
36600
  withdrawAmountD18: v,
36601
36601
  slippage: w
36602
- }), B = await p({
36603
- swapParams: U,
36604
- slippage: w
36605
- });
36606
- return ZW({
36607
- assetAddress: D,
36608
- swapData: B,
36609
- swapParams: U,
36610
- slippageToleranceForContractTransaction: M
36611
36602
  });
36603
+ if (U != null && U.srcData.length) {
36604
+ const B = await p({
36605
+ swapParams: U,
36606
+ slippage: w
36607
+ });
36608
+ return ZW({
36609
+ assetAddress: D,
36610
+ swapData: B,
36611
+ swapParams: U,
36612
+ slippageToleranceForContractTransaction: M
36613
+ });
36614
+ }
36612
36615
  } catch (U) {
36613
36616
  console.error(U);
36614
36617
  }
@@ -37240,7 +37243,7 @@ const aL = {
37240
37243
  const { chainId: p, vaultAddress: v, account: g } = f;
37241
37244
  if (!g || !t)
37242
37245
  return aL;
37243
- const w = (await import("./pyth-adapter-920d6792.js")).PythAdapter, x = Vb({
37246
+ const w = (await import("./pyth-adapter-8ac95c6a.js")).PythAdapter, x = Vb({
37244
37247
  abi: hg("synthetixV3Core"),
37245
37248
  functionName: "getPositionDebt",
37246
37249
  args: UW[v.toLowerCase()] ?? []
@@ -38650,7 +38653,7 @@ const SY = /* @__PURE__ */ Tg(xY), QC = () => {
38650
38653
  n.highSlippageListTitle,
38651
38654
  ":"
38652
38655
  ] }),
38653
- /* @__PURE__ */ R.jsxs("ul", { className: "dtw-list-inside dtw-list-disc dtw-flex dtw-flex-col dtw-gap-y-1 dtw-text-sm dtw-text-[color:var(--panel-secondary-content-color)] dtw-max-h-28 dtw-overflow-y-scroll", children: [
38656
+ /* @__PURE__ */ R.jsxs("ul", { className: "dtw-list-inside dtw-list-disc dtw-flex dtw-flex-col dtw-gap-y-1 dtw-text-sm dtw-text-[color:var(--panel-secondary-content-color)] dtw-max-h-28 dtw-overflow-y-auto", children: [
38654
38657
  /* @__PURE__ */ R.jsx("li", { children: n.termOfUseDepositAssetSlippage }),
38655
38658
  /* @__PURE__ */ R.jsx("li", { children: n.termOfUseDepositBugs }),
38656
38659
  /* @__PURE__ */ R.jsx("li", { children: n.termOfUseDepositDowntime }),
@@ -38689,7 +38692,7 @@ const SY = /* @__PURE__ */ Tg(xY), QC = () => {
38689
38692
  ] }),
38690
38693
  l ? /* @__PURE__ */ R.jsx("p", { className: "dtw-text-sm", children: "By proceeding with this trade, you acknowledge and accept the possibility of losing a part of your rewards (FMP)." }) : null,
38691
38694
  /* @__PURE__ */ R.jsx("p", { className: "dtw-text-sm dtw-self-start", children: "Please consider the following before confirming:" }),
38692
- /* @__PURE__ */ R.jsxs("ul", { className: "dtw-self-start dtw-list-inside dtw-list-disc dtw-flex dtw-flex-col dtw-gap-y-1 dtw-text-sm dtw-text-[color:var(--panel-secondary-content-color)] dtw-max-h-28 dtw-overflow-y-scroll", children: [
38695
+ /* @__PURE__ */ R.jsxs("ul", { className: "dtw-self-start dtw-list-inside dtw-list-disc dtw-flex dtw-flex-col dtw-gap-y-1 dtw-text-sm dtw-text-[color:var(--panel-secondary-content-color)] dtw-max-h-28 dtw-overflow-y-auto", children: [
38693
38696
  u && /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
38694
38697
  /* @__PURE__ */ R.jsxs("li", { className: "dtw-text-warning", children: [
38695
38698
  "If you withdraw now, you will incur a penalty of ",
@@ -39236,22 +39239,22 @@ const VY = /* @__PURE__ */ ge.forwardRef(WY), pL = VY, Wb = ({ children: t }) =>
39236
39239
  }
39237
39240
  );
39238
39241
  }, aq = ({ type: t }) => {
39239
- const n = It(), [{ status: a, link: l, action: u }, f] = Ll(), p = a == "Success", { handleReject: v } = Kp({ type: t }), g = u === "single_withdraw" && p, w = $e(
39242
+ const n = It(), [{ status: a, link: l, action: u }] = Ll(), f = a == "Success", { handleReject: p } = Kp({ type: t }), v = u === "single_withdraw" && f, g = $e(
39240
39243
  () => ({
39241
39244
  Wallet: n.sendingOrderToWallet,
39242
39245
  None: n.settingUpTx,
39243
39246
  Mining: n.miningTx
39244
39247
  }),
39245
39248
  [n]
39246
- ), x = () => {
39247
- f({ isOpen: !1 }), v();
39249
+ ), w = () => {
39250
+ p();
39248
39251
  };
39249
39252
  return {
39250
- title: w[a] ?? a,
39251
- isSuccessTx: p,
39253
+ title: g[a] ?? a,
39254
+ isSuccessTx: f,
39252
39255
  link: l,
39253
- onClose: x,
39254
- showNextStepTip: g
39256
+ onClose: w,
39257
+ showNextStepTip: v
39255
39258
  };
39256
39259
  }, iq = ({ sendTokens: t }) => {
39257
39260
  const n = It(), [a] = t ?? [];
@@ -39308,7 +39311,7 @@ const VY = /* @__PURE__ */ ge.forwardRef(WY), pL = VY, Wb = ({ children: t }) =>
39308
39311
  /* @__PURE__ */ R.jsx("span", { className: "dtw-font-semibold dtw-drop-shadow-md", children: a }),
39309
39312
  u ? /* @__PURE__ */ R.jsx(NE, { className: "dtw-h-6 dtw-w-6 dtw-text-success" }) : /* @__PURE__ */ R.jsx(p, { className: "dtw-h-5 dtw-w-5 " })
39310
39313
  ] }),
39311
- /* @__PURE__ */ R.jsx("div", { className: "dtw-font-light dtw-text-sm dtw-max-h-16 dtw-overflow-y-scroll dtw-break-all", children: /* @__PURE__ */ R.jsx(uq, {}) }),
39314
+ /* @__PURE__ */ R.jsx("div", { className: "dtw-font-light dtw-text-sm dtw-max-h-16 dtw-overflow-y-auto dtw-break-all", children: /* @__PURE__ */ R.jsx(uq, {}) }),
39312
39315
  n && /* @__PURE__ */ R.jsx(
39313
39316
  LM,
39314
39317
  {