@skip-go/widget 3.14.0 → 3.14.1

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.
@@ -45574,7 +45574,7 @@ function walletConnect(parameters) {
45574
45574
  const optionalChains = config2.chains.map((x2) => x2.id);
45575
45575
  if (!optionalChains.length)
45576
45576
  return;
45577
- const { EthereumProvider } = await import("./index.es-DlJZjBcA.js");
45577
+ const { EthereumProvider } = await import("./index.es-MjDHEa3g.js");
45578
45578
  return await EthereumProvider.init({
45579
45579
  ...parameters,
45580
45580
  disableProviderPing: true,
@@ -46429,6 +46429,7 @@ const batchSignTxsAtom = atom$1(true);
46429
46429
  const skipSubmitSwapExecutionAtom = atomWithMutation((get) => {
46430
46430
  var _a;
46431
46431
  const { userAddresses, route: route2, mainRoute, feeRoute, isFeeRouteEnabled, feeRouteUserAddresses } = get(swapExecutionStateAtom);
46432
+ const gorRoute = get(gasOnReceiveRouteAtom);
46432
46433
  const submitSwapExecutionCallbacks = get(submitSwapExecutionCallbacksAtom);
46433
46434
  const simulateTx = get(simulateTxAtom);
46434
46435
  const batchSignTxs = get(batchSignTxsAtom);
@@ -46454,7 +46455,7 @@ const skipSubmitSwapExecutionAtom = atomWithMutation((get) => {
46454
46455
  return {
46455
46456
  gcTime: Infinity,
46456
46457
  mutationFn: async ({ getSvmSigner }) => {
46457
- var _a2;
46458
+ var _a2, _b;
46458
46459
  const createParams = (sourceChainId) => {
46459
46460
  return {
46460
46461
  timeoutSeconds,
@@ -46504,6 +46505,7 @@ const skipSubmitSwapExecutionAtom = atomWithMutation((get) => {
46504
46505
  if (!(feeRouteUserAddresses == null ? void 0 : feeRouteUserAddresses.length)) return;
46505
46506
  track("execute route", {
46506
46507
  gasOnReceive: true,
46508
+ isFeeRouteAvailable: true,
46507
46509
  isDestinationFeeBalanceAvailable: isDestinationFeeBalanceAvailable.data,
46508
46510
  mainRoute,
46509
46511
  feeRoute
@@ -46528,6 +46530,7 @@ const skipSubmitSwapExecutionAtom = atomWithMutation((get) => {
46528
46530
  if (!userAddresses.length) return;
46529
46531
  track("execute route", {
46530
46532
  gasOnReceive: false,
46533
+ isFeeRouteAvailable: !!((_a2 = gorRoute.data) == null ? void 0 : _a2.gasOnReceiveAsset),
46531
46534
  isDestinationFeeBalanceAvailable: isDestinationFeeBalanceAvailable.data,
46532
46535
  mainRoute: route2
46533
46536
  });
@@ -46541,7 +46544,7 @@ const skipSubmitSwapExecutionAtom = atomWithMutation((get) => {
46541
46544
  } catch (error) {
46542
46545
  console.error(error);
46543
46546
  const currentTransaction = get(currentTransactionAtom);
46544
- (_a2 = submitSwapExecutionCallbacks == null ? void 0 : submitSwapExecutionCallbacks.onError) == null ? void 0 : _a2.call(submitSwapExecutionCallbacks, error, currentTransaction == null ? void 0 : currentTransaction.transactionDetails);
46547
+ (_b = submitSwapExecutionCallbacks == null ? void 0 : submitSwapExecutionCallbacks.onError) == null ? void 0 : _b.call(submitSwapExecutionCallbacks, error, currentTransaction == null ? void 0 : currentTransaction.transactionDetails);
46545
46548
  }
46546
46549
  return null;
46547
46550
  },
@@ -48931,7 +48934,7 @@ const RouteArrow = ({ color = "currentColor" }) => /* @__PURE__ */ jsx("svg", {
48931
48934
  function formatUSD(amount) {
48932
48935
  const amountNumber = typeof amount === "string" ? parseFloat(amount) : amount;
48933
48936
  const minDisplayable = 1 / Math.pow(10, 2);
48934
- if (amountNumber > 0 && amountNumber < minDisplayable) {
48937
+ if (amountNumber >= 0 && amountNumber < minDisplayable) {
48935
48938
  return `< ${usdFormatter.format(minDisplayable)}`;
48936
48939
  }
48937
48940
  return usdFormatter.format(amountNumber);
@@ -52334,13 +52337,10 @@ const SwitchThumb = dt.div`
52334
52337
  transform: translateX(${({ checked }) => checked ? "16px" : "0"});
52335
52338
  `;
52336
52339
  const Switch = ({ checked = false, onChange }) => {
52337
- const [isChecked, setIsChecked] = useState(checked);
52338
52340
  const toggle = () => {
52339
- const newVal = !isChecked;
52340
- setIsChecked(newVal);
52341
- onChange == null ? void 0 : onChange(newVal);
52341
+ onChange == null ? void 0 : onChange(!checked);
52342
52342
  };
52343
- return /* @__PURE__ */ jsx(SwitchWrapper, { checked: isChecked, onClick: toggle, children: /* @__PURE__ */ jsx(SwitchThumb, { checked: isChecked }) });
52343
+ return /* @__PURE__ */ jsx(SwitchWrapper, { checked, onClick: toggle, children: /* @__PURE__ */ jsx(SwitchThumb, { checked }) });
52344
52344
  };
52345
52345
  const SpinnerIcon = (props) => {
52346
52346
  return /* @__PURE__ */ jsxs("svg", { fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
@@ -53533,7 +53533,7 @@ const useConnectToMissingCosmosChain = () => {
53533
53533
  };
53534
53534
  const name = "@skip-go/widget";
53535
53535
  const description = "Swap widget";
53536
- const version = "3.14.0";
53536
+ const version = "3.14.1";
53537
53537
  const repository = {
53538
53538
  url: "https://github.com/skip-mev/skip-go",
53539
53539
  directory: "packages/widget"
@@ -1,4 +1,4 @@
1
- import { g as getAugmentedNamespace, c as commonjsGlobal, a as getDefaultExportFromCjs, p as process$1 } from "./index-D_ZwdovB.js";
1
+ import { g as getAugmentedNamespace, c as commonjsGlobal, a as getDefaultExportFromCjs, p as process$1 } from "./index-DESptRlh.js";
2
2
  import qg, { PROPOSAL_EXPIRY_MESSAGE } from "@walletconnect/sign-client";
3
3
  const global = globalThis || void 0 || self;
4
4
  var buffer$1 = {};
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { W, d, l, o, r, s } from "./index-D_ZwdovB.js";
1
+ import { W, d, l, o, r, s } from "./index-DESptRlh.js";
2
2
  export {
3
3
  W as Widget,
4
4
  d as defaultTheme,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@skip-go/widget",
3
3
  "description": "Swap widget",
4
- "version": "3.14.0",
4
+ "version": "3.14.1",
5
5
  "repository": {
6
6
  "url": "https://github.com/skip-mev/skip-go",
7
7
  "directory": "packages/widget"