@skip-go/widget 3.12.2 → 3.12.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import o, { useContext, useState, useMemo, useEffect, useRef, useDebugValue, createElement, useCallback, Fragment as Fragment$1, memo, forwardRef } from "react";
|
|
2
|
+
import o, { useContext, useState, useMemo, useEffect, useRef, useDebugValue, createElement, useCallback, Fragment as Fragment$1, memo, startTransition, forwardRef, Suspense } from "react";
|
|
3
3
|
import { Scope } from "react-shadow-scope";
|
|
4
4
|
import { atom as atom$1, useAtomValue, useAtom, useSetAtom, createStore, Provider } from "jotai";
|
|
5
5
|
import NiceModal, { useModal } from "@ebay/nice-modal-react";
|
|
@@ -45294,7 +45294,7 @@ function walletConnect(parameters) {
|
|
|
45294
45294
|
const optionalChains = config2.chains.map((x2) => x2.id);
|
|
45295
45295
|
if (!optionalChains.length)
|
|
45296
45296
|
return;
|
|
45297
|
-
const { EthereumProvider } = await import("./index.es-
|
|
45297
|
+
const { EthereumProvider } = await import("./index.es-DrM_N5rw.js");
|
|
45298
45298
|
return await EthereumProvider.init({
|
|
45299
45299
|
...parameters,
|
|
45300
45300
|
disableProviderPing: true,
|
|
@@ -52790,6 +52790,19 @@ const SwapPage = () => {
|
|
|
52790
52790
|
routePreference,
|
|
52791
52791
|
slippage
|
|
52792
52792
|
});
|
|
52793
|
+
const navigateToSwapExecutionPage = () => {
|
|
52794
|
+
startTransition(() => {
|
|
52795
|
+
setError(void 0);
|
|
52796
|
+
setChainAddresses({});
|
|
52797
|
+
setSwapExecutionState();
|
|
52798
|
+
setUser({ username: sourceAccount == null ? void 0 : sourceAccount.address });
|
|
52799
|
+
if (sourceAccount == null ? void 0 : sourceAccount.address) {
|
|
52800
|
+
const replay = getReplay();
|
|
52801
|
+
replay == null ? void 0 : replay.start();
|
|
52802
|
+
}
|
|
52803
|
+
setCurrentPage(Routes.SwapExecutionPage);
|
|
52804
|
+
});
|
|
52805
|
+
};
|
|
52793
52806
|
setUserId(sourceAccount == null ? void 0 : sourceAccount.address);
|
|
52794
52807
|
if (showCosmosLedgerWarning) {
|
|
52795
52808
|
track("warning page: cosmos ledger", { route: route2 });
|
|
@@ -52806,10 +52819,7 @@ const SwapPage = () => {
|
|
|
52806
52819
|
setError({
|
|
52807
52820
|
errorWarningType: ErrorWarningType.BadPriceWarning,
|
|
52808
52821
|
onClickContinue: () => {
|
|
52809
|
-
|
|
52810
|
-
setChainAddresses({});
|
|
52811
|
-
setCurrentPage(Routes.SwapExecutionPage);
|
|
52812
|
-
setSwapExecutionState();
|
|
52822
|
+
navigateToSwapExecutionPage();
|
|
52813
52823
|
},
|
|
52814
52824
|
onClickBack: () => {
|
|
52815
52825
|
setError(void 0);
|
|
@@ -52823,10 +52833,7 @@ const SwapPage = () => {
|
|
|
52823
52833
|
setError({
|
|
52824
52834
|
errorWarningType: ErrorWarningType.LowInfoWarning,
|
|
52825
52835
|
onClickContinue: () => {
|
|
52826
|
-
|
|
52827
|
-
setChainAddresses({});
|
|
52828
|
-
setCurrentPage(Routes.SwapExecutionPage);
|
|
52829
|
-
setSwapExecutionState();
|
|
52836
|
+
navigateToSwapExecutionPage();
|
|
52830
52837
|
},
|
|
52831
52838
|
onClickBack: () => {
|
|
52832
52839
|
setError(void 0);
|
|
@@ -52840,10 +52847,7 @@ const SwapPage = () => {
|
|
|
52840
52847
|
setError({
|
|
52841
52848
|
errorWarningType: ErrorWarningType.GoFastWarning,
|
|
52842
52849
|
onClickContinue: () => {
|
|
52843
|
-
|
|
52844
|
-
setChainAddresses({});
|
|
52845
|
-
setCurrentPage(Routes.SwapExecutionPage);
|
|
52846
|
-
setSwapExecutionState();
|
|
52850
|
+
navigateToSwapExecutionPage();
|
|
52847
52851
|
},
|
|
52848
52852
|
onClickBack: () => {
|
|
52849
52853
|
setCurrentPage(Routes.SwapPage);
|
|
@@ -52852,14 +52856,7 @@ const SwapPage = () => {
|
|
|
52852
52856
|
});
|
|
52853
52857
|
return;
|
|
52854
52858
|
}
|
|
52855
|
-
|
|
52856
|
-
setCurrentPage(Routes.SwapExecutionPage);
|
|
52857
|
-
setUser({ username: sourceAccount == null ? void 0 : sourceAccount.address });
|
|
52858
|
-
if (sourceAccount == null ? void 0 : sourceAccount.address) {
|
|
52859
|
-
const replay = getReplay();
|
|
52860
|
-
replay == null ? void 0 : replay.start();
|
|
52861
|
-
}
|
|
52862
|
-
setSwapExecutionState();
|
|
52859
|
+
navigateToSwapExecutionPage();
|
|
52863
52860
|
};
|
|
52864
52861
|
return /* @__PURE__ */ jsx(
|
|
52865
52862
|
MainButton,
|
|
@@ -54046,7 +54043,7 @@ const Router = () => {
|
|
|
54046
54043
|
}
|
|
54047
54044
|
switch (currentPage) {
|
|
54048
54045
|
case Routes.SwapPage:
|
|
54049
|
-
return /* @__PURE__ */ jsx(
|
|
54046
|
+
return /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
54050
54047
|
ErrorBoundary,
|
|
54051
54048
|
{
|
|
54052
54049
|
fallback: null,
|
|
@@ -54056,9 +54053,9 @@ const Router = () => {
|
|
|
54056
54053
|
},
|
|
54057
54054
|
children: /* @__PURE__ */ jsx(SwapPage, {})
|
|
54058
54055
|
}
|
|
54059
|
-
);
|
|
54056
|
+
) });
|
|
54060
54057
|
case Routes.SwapExecutionPage:
|
|
54061
|
-
return /* @__PURE__ */ jsx(
|
|
54058
|
+
return /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
54062
54059
|
ErrorBoundary,
|
|
54063
54060
|
{
|
|
54064
54061
|
fallback: null,
|
|
@@ -54068,9 +54065,9 @@ const Router = () => {
|
|
|
54068
54065
|
},
|
|
54069
54066
|
children: /* @__PURE__ */ jsx(SwapExecutionPage, {})
|
|
54070
54067
|
}
|
|
54071
|
-
);
|
|
54068
|
+
) });
|
|
54072
54069
|
case Routes.TransactionHistoryPage:
|
|
54073
|
-
return /* @__PURE__ */ jsx(
|
|
54070
|
+
return /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
54074
54071
|
ErrorBoundary,
|
|
54075
54072
|
{
|
|
54076
54073
|
fallback: null,
|
|
@@ -54082,7 +54079,7 @@ const Router = () => {
|
|
|
54082
54079
|
},
|
|
54083
54080
|
children: /* @__PURE__ */ jsx(TransactionHistoryPage, {})
|
|
54084
54081
|
}
|
|
54085
|
-
);
|
|
54082
|
+
) });
|
|
54086
54083
|
}
|
|
54087
54084
|
};
|
|
54088
54085
|
const useInitDefaultRoute = (defaultRoute) => {
|
|
@@ -54125,7 +54122,7 @@ const initSentry = () => {
|
|
|
54125
54122
|
};
|
|
54126
54123
|
const name = "@skip-go/widget";
|
|
54127
54124
|
const description = "Swap widget";
|
|
54128
|
-
const version = "3.12.
|
|
54125
|
+
const version = "3.12.3";
|
|
54129
54126
|
const repository = {
|
|
54130
54127
|
url: "https://github.com/skip-mev/skip-go",
|
|
54131
54128
|
directory: "packages/widget"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getAugmentedNamespace, c as commonjsGlobal, a as getDefaultExportFromCjs, p as process$1 } from "./index-
|
|
1
|
+
import { g as getAugmentedNamespace, c as commonjsGlobal, a as getDefaultExportFromCjs, p as process$1 } from "./index-BkuAy8zJ.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