tek-wallet 0.0.648 → 0.0.649
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.
|
@@ -99,9 +99,9 @@ exports.SwapFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
99
99
|
var router = (0, useCustomRouter_1.default)();
|
|
100
100
|
var searchParams = (0, navigation_1.useSearchParams)();
|
|
101
101
|
console.warn("🚀 ~ searchParams:", searchParams);
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
// const isSwapPage = searchParams.get("is_swap_page") === "true";
|
|
103
|
+
// const isHistoryPage = searchParams.get("is_history_page") === "true";
|
|
104
|
+
// const isHistoryDetailPage = searchParams.get("is_history_detail_page") === "true";
|
|
105
105
|
var onChange = (0, react_1.useCallback)(function (e) {
|
|
106
106
|
var value = e.target.value;
|
|
107
107
|
setNumber(value === "" ? null : Number(value));
|
|
@@ -191,13 +191,12 @@ exports.SwapFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
191
191
|
gotoStep(SwapStep.SELECT_SWAP);
|
|
192
192
|
forgetCurrentPage(SwapPage.SWAP_HISTORY);
|
|
193
193
|
}, [forgetCurrentPage, gotoStep]);
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}, [handleOnOpenHistory]);
|
|
194
|
+
// const openHistory = useCallback(() => {
|
|
195
|
+
// setTimeout(() => {
|
|
196
|
+
// historyRef.current?.open();
|
|
197
|
+
// handleOnOpenHistory();
|
|
198
|
+
// }, 0);
|
|
199
|
+
// }, [handleOnOpenHistory]);
|
|
201
200
|
// const closeHistory = useCallback(() => {
|
|
202
201
|
// historyRef.current?.close();
|
|
203
202
|
// handleOnCloseHistory();
|
|
@@ -222,17 +221,17 @@ exports.SwapFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
222
221
|
open: openSwapPage,
|
|
223
222
|
close: closeSwapPage,
|
|
224
223
|
}); });
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}, [isSwapPage, isHistoryPage, isHistoryDetailPage]);
|
|
224
|
+
// useEffect(() => {
|
|
225
|
+
// if (isSwapPage) {
|
|
226
|
+
// openSwapPage();
|
|
227
|
+
// }
|
|
228
|
+
// if (isSwapPage && isHistoryPage) {
|
|
229
|
+
// openHistory();
|
|
230
|
+
// }
|
|
231
|
+
// if (isSwapPage && isHistoryPage && isHistoryDetailPage) {
|
|
232
|
+
// openHistory();
|
|
233
|
+
// }
|
|
234
|
+
// }, [isSwapPage, isHistoryPage, isHistoryDetailPage]);
|
|
236
235
|
return ((0, jsx_runtime_1.jsx)(RequireConnect_1.default, { children: (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { className: className, sx: sx, ref: drawerRef, trigger: props.children, onOpen: handleOnOpenSwap, onClose: handleOnCloseSwap, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: SWAP_STEP_NAME[currentStep], overrideBack: handleBack, rightAdornment: currentStep === SwapStep.SELECT_SWAP && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4, marginLeft: "auto" }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("help"), width: 18, height: 18 }), (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", sx: {
|
|
237
236
|
height: "1rem",
|
|
238
237
|
width: "1px",
|