tek-wallet 0.0.685 → 0.0.686
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/dist/components/TekWallet/components/ui/BackHeader/index.d.ts +1 -1
- package/dist/components/TekWallet/components/ui/ConfirmLayout/index.js +1 -1
- package/dist/components/TekWallet/components/ui/ModalSelectToken/index.js +1 -1
- package/dist/components/TekWallet/components/ui/PageHeader/index.d.ts +3 -2
- package/dist/components/TekWallet/components/ui/PageHeader/index.js +1 -1
- package/dist/components/TekWallet/components/ui/QrCodeReader/index.js +121 -83
- package/dist/components/TekWallet/components/ui/ReceiveFunction/index.js +1 -1
- package/dist/components/TekWallet/components/ui/SwapFunction/index.js +1 -1
- package/dist/components/TekWallet/providers/TekWalletProvider/index.js +1 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GeneralProps } from "../../../types/ui";
|
|
2
|
-
interface BackHeaderProps extends GeneralProps {
|
|
2
|
+
export interface BackHeaderProps extends GeneralProps {
|
|
3
3
|
overrideBack?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
4
4
|
center?: React.ReactNode;
|
|
5
5
|
right?: React.ReactNode;
|
|
@@ -93,7 +93,7 @@ var ConfirmLayout = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
93
93
|
(_a = confirmByPasscodeDrawerRef.current) === null || _a === void 0 ? void 0 : _a.unlockStatus();
|
|
94
94
|
},
|
|
95
95
|
}); });
|
|
96
|
-
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, __assign({ direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, ref: confirmByPasscodeDrawerRef }, rest, { children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: (_a = header === null || header === void 0 ? void 0 : header.title) !== null && _a !== void 0 ? _a : action, overrideBack: handleOnClose
|
|
96
|
+
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, __assign({ direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, ref: confirmByPasscodeDrawerRef }, rest, { children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: (_a = header === null || header === void 0 ? void 0 : header.title) !== null && _a !== void 0 ? _a : action, overrideBack: handleOnClose }), footer: confirmAction, children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { alignItems: "center", gap: theme.mixins.gaps.g16, padding: theme.mixins.customPadding.p16 }), children: children }) }) })));
|
|
97
97
|
});
|
|
98
98
|
ConfirmLayout.displayName = "ConfirmLayout";
|
|
99
99
|
exports.default = ConfirmLayout;
|
|
@@ -91,7 +91,7 @@ var ModalSelectToken = function (props) {
|
|
|
91
91
|
"& .MuiDrawer-paper": {
|
|
92
92
|
width: "100%",
|
|
93
93
|
},
|
|
94
|
-
}, className: "!bg-white !rounded-none !size-full", anchor: DrawerDrag_1.DRAWER_DIRECTION.RIGHT, open: open, onClose: onClose, onOpen: onOpen, title: (0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { overrideBack: onClose, onClick: onClose, title: selectTokenForm.value === true ? "Select from token" : "Select to token",
|
|
94
|
+
}, className: "!bg-white !rounded-none !size-full", anchor: DrawerDrag_1.DRAWER_DIRECTION.RIGHT, open: open, onClose: onClose, onOpen: onOpen, title: (0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { overrideBack: onClose, onClick: onClose, title: selectTokenForm.value === true ? "Select from token" : "Select to token", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex gap-1 items-center ml-auto", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { onClick: function () { return router.push("/help"); }, src: (0, getIcon_1.default)("help") }), (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", sx: {
|
|
95
95
|
height: "15px",
|
|
96
96
|
width: "1px",
|
|
97
97
|
backgroundColor: theme.palette.border.accent3,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { GeneralProps } from "../../../types/ui";
|
|
2
|
-
|
|
2
|
+
import { BackHeaderProps } from "../BackHeader";
|
|
3
|
+
interface PageHeaderProps extends GeneralProps, BackHeaderProps {
|
|
3
4
|
overrideBack?: (e: React.MouseEvent<HTMLDivElement>) => unknown;
|
|
4
5
|
title?: React.ReactNode;
|
|
5
|
-
|
|
6
|
+
children?: React.ReactNode;
|
|
6
7
|
renderBack?: (Back: React.ReactNode) => React.ReactNode;
|
|
7
8
|
}
|
|
8
9
|
declare const PageHeader: (props: PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,6 +21,6 @@ var BackHeader_1 = __importDefault(require("../BackHeader"));
|
|
|
21
21
|
var Text_1 = __importDefault(require("../Text"));
|
|
22
22
|
var PageHeader = function (props) {
|
|
23
23
|
var theme = (0, ThemeProvider_1.useTheme)();
|
|
24
|
-
return ((0, jsx_runtime_1.jsxs)(BackHeader_1.default, { overrideBack: props.overrideBack, renderBack: props.renderBack, sx: __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", height: "100%", position: "relative", paddingLeft: theme.mixins.pagePadding.paddingLeft, paddingRight: theme.mixins.pagePadding.paddingRight, minHeight: "3.125rem" }, props.sx), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign(__assign({}, theme.mixins.headerTitle), theme.mixins.center), { color:
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)(BackHeader_1.default, { overrideBack: props.overrideBack, renderBack: props.renderBack, hideBack: props.hideBack, sx: __assign({ display: "flex", alignItems: "center", justifyContent: "space-between", height: "100%", position: "relative", paddingLeft: theme.mixins.pagePadding.paddingLeft, paddingRight: theme.mixins.pagePadding.paddingRight, minHeight: "3.125rem", color: theme.palette.text.white }, props.sx), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign(__assign({}, theme.mixins.headerTitle), theme.mixins.center), { fontWeight: "inherit", color: "inherit" }), children: props.title }), props.children] }));
|
|
25
25
|
};
|
|
26
26
|
exports.default = PageHeader;
|
|
@@ -9,11 +9,20 @@ var DrawerComponent_1 = __importDefault(require("../DrawerComponent"));
|
|
|
9
9
|
var react_1 = require("react");
|
|
10
10
|
var react_qr_scanner_1 = require("@yudiel/react-qr-scanner");
|
|
11
11
|
var AppBackDrop_1 = __importDefault(require("../AppBackDrop"));
|
|
12
|
+
var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
|
|
13
|
+
var PageHeader_1 = __importDefault(require("../PageHeader"));
|
|
14
|
+
var STYLES = {
|
|
15
|
+
borderWidth: "4px",
|
|
16
|
+
borderColor: "#ffffff",
|
|
17
|
+
borderRadius: "8px",
|
|
18
|
+
nodeSize: "10%",
|
|
19
|
+
};
|
|
12
20
|
var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
|
|
13
21
|
var qrReaderContainer = (0, react_1.useRef)(null);
|
|
14
22
|
var drawerRef = (0, react_1.useRef)(null);
|
|
15
23
|
var _a = (0, react_1.useState)(false), isOpen = _a[0], setIsOpen = _a[1];
|
|
16
24
|
var _b = (0, react_1.useState)(false), isReaderReady = _b[0], setIsReaderReady = _b[1];
|
|
25
|
+
var _c = (0, react_1.useState)(false), flashEnabled = _c[0], setFlashEnabled = _c[1];
|
|
17
26
|
var open = function () {
|
|
18
27
|
var _a;
|
|
19
28
|
(_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.open();
|
|
@@ -38,6 +47,28 @@ var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
38
47
|
var handleCanPlay = function () {
|
|
39
48
|
setIsReaderReady(true);
|
|
40
49
|
};
|
|
50
|
+
var toggleFlash = function () {
|
|
51
|
+
var _a;
|
|
52
|
+
var video = (_a = qrReaderContainer.current) === null || _a === void 0 ? void 0 : _a.querySelector("video");
|
|
53
|
+
if (video) {
|
|
54
|
+
var stream = video.srcObject;
|
|
55
|
+
var track = stream === null || stream === void 0 ? void 0 : stream.getTracks()[0];
|
|
56
|
+
console.warn("🚀 ~ toggleFlash ~ track:", track.getCapabilities());
|
|
57
|
+
var torch = track.getCapabilities().torch;
|
|
58
|
+
console.warn("🚀 ~ toggleFlash ~ torch:", torch);
|
|
59
|
+
if (torch) {
|
|
60
|
+
track
|
|
61
|
+
.applyConstraints({
|
|
62
|
+
advanced: [{ torch: !flashEnabled }],
|
|
63
|
+
})
|
|
64
|
+
.then(function () {
|
|
65
|
+
console.warn("🚀 ~ toggleFlash ~ flashEnabled:", flashEnabled);
|
|
66
|
+
setFlashEnabled(!flashEnabled);
|
|
67
|
+
})
|
|
68
|
+
.catch(function (err) { return console.error("Error toggling flash:", err); });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
41
72
|
(0, react_1.useEffect)(function () {
|
|
42
73
|
var _a;
|
|
43
74
|
var video = (_a = qrReaderContainer.current) === null || _a === void 0 ? void 0 : _a.querySelector("video");
|
|
@@ -50,92 +81,99 @@ var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
50
81
|
}, [isOpen]);
|
|
51
82
|
// Thêm CSS animation vào document khi component được mount
|
|
52
83
|
(0, react_1.useEffect)(function () {
|
|
53
|
-
var animationStyle = "\n @keyframes move-up-down {\n 0% {\n top:
|
|
84
|
+
var animationStyle = "\n @keyframes move-up-down {\n 0% {\n top: 0%;\n } \n 50% {\n top: 100%;\n }\n 100% {\n top: 0%;\n }\n }\n ";
|
|
54
85
|
// Thêm animation vào stylesheet đầu tiên của trang
|
|
55
86
|
document.styleSheets[0].insertRule(animationStyle, 0);
|
|
56
87
|
}, []); // Chỉ chạy một lần khi component mount
|
|
57
|
-
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { trigger: props.children, ref: drawerRef, onClose: onClose, onOpen: onOpen, children: (0, jsx_runtime_1.jsx)(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
88
|
+
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { trigger: props.children, ref: drawerRef, onClose: onClose, onOpen: onOpen, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { hideBack: true, title: "Scan QR code", sx: {
|
|
89
|
+
position: "absolute",
|
|
90
|
+
top: 0,
|
|
91
|
+
left: 0,
|
|
92
|
+
right: 0,
|
|
93
|
+
zIndex: 1000,
|
|
94
|
+
height: "fit-content",
|
|
95
|
+
fontWeight: 700,
|
|
96
|
+
}, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
|
|
97
|
+
width: "1.5rem",
|
|
98
|
+
height: "1.5rem",
|
|
99
|
+
cursor: "pointer",
|
|
100
|
+
ml: "auto",
|
|
101
|
+
}, onClick: close, children: (0, jsx_runtime_1.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M5 15L15 5M5 5L15 15", stroke: "white", "stroke-width": "1.25", "stroke-linecap": "round", "stroke-linejoin": "round" }) }) }) }), children: (0, jsx_runtime_1.jsx)("div", { ref: qrReaderContainer, children: isOpen && ((0, jsx_runtime_1.jsxs)(react_qr_scanner_1.Scanner, { components: {
|
|
102
|
+
audio: false,
|
|
103
|
+
finder: false,
|
|
104
|
+
}, styles: {
|
|
105
|
+
container: {
|
|
106
|
+
width: "100%",
|
|
107
|
+
height: "100dvh",
|
|
108
|
+
position: "relative",
|
|
109
|
+
},
|
|
110
|
+
video: {
|
|
111
|
+
width: "100%",
|
|
112
|
+
height: "100%",
|
|
113
|
+
objectFit: "cover",
|
|
114
|
+
},
|
|
115
|
+
}, onScan: props.onResult, children: [!isReaderReady && ((0, jsx_runtime_1.jsx)(AppBackDrop_1.default, { open: !isReaderReady, message: "Starting the camera..." })), isReaderReady && ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
116
|
+
width: "60%",
|
|
117
|
+
aspectRatio: "1",
|
|
118
|
+
position: "absolute",
|
|
119
|
+
top: "40%",
|
|
120
|
+
left: "50%",
|
|
121
|
+
transform: "translateX(-50%) translateY(-50%)",
|
|
122
|
+
display: "relative",
|
|
123
|
+
boxShadow: "0 0 2px max(50vw, 50dvh) rgba(0, 0, 0, 0.36)",
|
|
124
|
+
color: "#C5E99F",
|
|
125
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
126
|
+
position: "absolute",
|
|
127
|
+
left: 0,
|
|
128
|
+
width: "100%",
|
|
129
|
+
height: "2px",
|
|
130
|
+
backgroundImage: "linear-gradient(to right, transparent, currentColor, transparent)",
|
|
131
|
+
// animation: "move-up-down 4s infinite linear",
|
|
132
|
+
} }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
133
|
+
position: "absolute",
|
|
134
|
+
borderTopLeftRadius: STYLES.borderRadius,
|
|
135
|
+
top: "-".concat(STYLES.borderWidth),
|
|
136
|
+
left: "-".concat(STYLES.borderWidth),
|
|
137
|
+
width: STYLES.nodeSize,
|
|
138
|
+
height: STYLES.nodeSize,
|
|
139
|
+
borderTop: "".concat(STYLES.borderWidth, " solid ").concat(STYLES.borderColor),
|
|
140
|
+
borderLeft: "".concat(STYLES.borderWidth, " solid ").concat(STYLES.borderColor),
|
|
141
|
+
} }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
142
|
+
position: "absolute",
|
|
143
|
+
borderTopRightRadius: STYLES.borderRadius,
|
|
144
|
+
top: "-".concat(STYLES.borderWidth),
|
|
145
|
+
right: "-".concat(STYLES.borderWidth),
|
|
146
|
+
width: STYLES.nodeSize,
|
|
147
|
+
height: STYLES.nodeSize,
|
|
148
|
+
borderTop: "".concat(STYLES.borderWidth, " solid ").concat(STYLES.borderColor),
|
|
149
|
+
borderRight: "".concat(STYLES.borderWidth, " solid ").concat(STYLES.borderColor),
|
|
150
|
+
} }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
151
|
+
position: "absolute",
|
|
152
|
+
borderBottomLeftRadius: STYLES.borderRadius,
|
|
153
|
+
bottom: "-".concat(STYLES.borderWidth),
|
|
154
|
+
left: "-".concat(STYLES.borderWidth),
|
|
155
|
+
width: STYLES.nodeSize,
|
|
156
|
+
height: STYLES.nodeSize,
|
|
157
|
+
borderBottom: "".concat(STYLES.borderWidth, " solid ").concat(STYLES.borderColor),
|
|
158
|
+
borderLeft: "".concat(STYLES.borderWidth, " solid ").concat(STYLES.borderColor),
|
|
159
|
+
} }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
160
|
+
position: "absolute",
|
|
161
|
+
borderBottomRightRadius: STYLES.borderRadius,
|
|
162
|
+
bottom: "-".concat(STYLES.borderWidth),
|
|
163
|
+
right: "-".concat(STYLES.borderWidth),
|
|
164
|
+
width: STYLES.nodeSize,
|
|
165
|
+
height: STYLES.nodeSize,
|
|
166
|
+
borderBottom: "".concat(STYLES.borderWidth, " solid ").concat(STYLES.borderColor),
|
|
167
|
+
borderRight: "".concat(STYLES.borderWidth, " solid ").concat(STYLES.borderColor),
|
|
168
|
+
} }), (0, jsx_runtime_1.jsx)("div", { onClick: toggleFlash, style: {
|
|
169
|
+
position: "absolute",
|
|
170
|
+
top: "100%",
|
|
171
|
+
left: "50%",
|
|
172
|
+
transform: "translateX(-50%) translateY(0.75rem)",
|
|
173
|
+
fontSize: "1rem",
|
|
174
|
+
fontWeight: 500,
|
|
175
|
+
color: "#fff",
|
|
176
|
+
}, children: "Scan QR code" })] }))] })) }) }) }));
|
|
139
177
|
});
|
|
140
178
|
QrCodeReader.displayName = "QrCodeReader";
|
|
141
179
|
exports.default = QrCodeReader;
|
|
@@ -333,7 +333,7 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
333
333
|
}, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, height: "fit-content", width: "100%" }), children: [(0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { title: "Top up via internal transfer", description: "Receive crypto from other Ting users", icon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 24, height: 24 }, children: SvgPath_1.IC_RECEIVE_INTERNAL }), onClick: function () { return handleSelectMethod(ReceiveMethods.RECEIVE_INTERNAL); } }), (0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { title: "Top up via blockchain", description: "Deposit using a Web3 or an Exchange wallet", icon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 24, height: 24 }, children: SvgPath_1.IC_RECEIVE_EXTERNAL }), onClick: function () { return handleSelectMethod(ReceiveMethods.RECEIVE_EXTERNAL); } })] }), children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: {
|
|
334
334
|
position: "relative",
|
|
335
335
|
sx: "100dvh",
|
|
336
|
-
}, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: RECEIVE_STEP_NAME[Math.max(currentStep, ReceiveStep.SELECT_TOKEN)], overrideBack: handleBack,
|
|
336
|
+
}, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: RECEIVE_STEP_NAME[Math.max(currentStep, ReceiveStep.SELECT_TOKEN)], overrideBack: handleBack, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, marginLeft: "auto" }), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 20, height: 20 }, children: SvgPath_1.IC_HELP }), (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", sx: {
|
|
337
337
|
height: "1rem",
|
|
338
338
|
width: "1px",
|
|
339
339
|
backgroundColor: theme.palette.border.accent3,
|
|
@@ -232,7 +232,7 @@ exports.SwapFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
232
232
|
openHistory();
|
|
233
233
|
}
|
|
234
234
|
}, [isSwapPage, isHistoryPage, isHistoryDetailPage]);
|
|
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,
|
|
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, children: currentStep === SwapStep.SELECT_SWAP && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 18, height: 18 }, children: SvgPath_1.IC_HELP }), (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", sx: {
|
|
236
236
|
height: "1rem",
|
|
237
237
|
width: "1px",
|
|
238
238
|
backgroundColor: theme.palette.border.accent3,
|
|
@@ -18,7 +18,6 @@ var SwapProvider_1 = __importDefault(require("../SwapProvider"));
|
|
|
18
18
|
var WalletDataProviderNoImport_1 = __importDefault(require("../WalletDataProviderNoImport"));
|
|
19
19
|
var WalletDataProvider_1 = __importDefault(require("../WalletDataProvider"));
|
|
20
20
|
var ThemeProvider_1 = require("../ThemeProvider");
|
|
21
|
-
var ContentHiddenProvider_1 = __importDefault(require("../ContentHiddenProvider"));
|
|
22
21
|
var initialTekWalletContext = {
|
|
23
22
|
isSSO: undefined,
|
|
24
23
|
};
|
|
@@ -30,6 +29,6 @@ function TekWalletProvider(_a) {
|
|
|
30
29
|
var onDisconnect = function () {
|
|
31
30
|
setResetTrigger(function (prev) { return prev + "1"; });
|
|
32
31
|
};
|
|
33
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)(exports.TekWalletContext.Provider, { value: { isSSO: isSSO }, children: (0, jsx_runtime_1.jsx)(WalletProvider, { accessToken: accessToken !== null && accessToken !== void 0 ? accessToken : "", onDisconnect: onDisconnect, children: (0, jsx_runtime_1.jsx)(ThemeProvider_1.CustomThemeProvider, { children: (0, jsx_runtime_1.jsx)(RealtimeProvider_1.default, { options: options, children: (0, jsx_runtime_1.jsx)(ActivitiesProvider_1.default, { children: (0, jsx_runtime_1.jsx)(ReceiveProvider_1.default, { children: (0, jsx_runtime_1.jsx)(LockTokenProvider_1.default, { children: (0, jsx_runtime_1.jsx)(WithdrawProvider_1.default, { children: (0, jsx_runtime_1.jsx)(SwapProvider_1.default, { children: (0, jsx_runtime_1.jsx)(EventHandlerProvider_1.default, { options: options, children: children }) }) }) }) }) }) }) }) }, resetTrigger) }));
|
|
34
33
|
}
|
|
35
34
|
exports.default = TekWalletProvider;
|