tek-wallet 0.0.186 → 0.0.188
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.
|
@@ -137,26 +137,26 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
137
137
|
};
|
|
138
138
|
var handleOtpChange = function (value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
139
139
|
var err_1;
|
|
140
|
-
var _a, _b
|
|
141
|
-
return __generator(this, function (
|
|
142
|
-
switch (
|
|
140
|
+
var _a, _b;
|
|
141
|
+
return __generator(this, function (_c) {
|
|
142
|
+
switch (_c.label) {
|
|
143
143
|
case 0:
|
|
144
|
-
|
|
144
|
+
_c.trys.push([0, 3, , 4]);
|
|
145
145
|
setOtp(value);
|
|
146
146
|
if (!(value.length === passcodeLength)) return [3 /*break*/, 2];
|
|
147
|
+
// drawerRef.current?.lockStatus();
|
|
147
148
|
(_a = loadingRef.current) === null || _a === void 0 ? void 0 : _a.startLoading();
|
|
148
|
-
(_b = drawerRef.current) === null || _b === void 0 ? void 0 : _b.lockStatus();
|
|
149
149
|
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 5000); })];
|
|
150
150
|
case 1:
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
(
|
|
151
|
+
_c.sent();
|
|
152
|
+
// drawerRef.current?.unlockStatus();
|
|
153
|
+
(_b = loadingRef.current) === null || _b === void 0 ? void 0 : _b.endLoading();
|
|
154
154
|
handleClose();
|
|
155
155
|
onConfirmSuccess === null || onConfirmSuccess === void 0 ? void 0 : onConfirmSuccess(value);
|
|
156
|
-
|
|
156
|
+
_c.label = 2;
|
|
157
157
|
case 2: return [3 /*break*/, 4];
|
|
158
158
|
case 3:
|
|
159
|
-
err_1 =
|
|
159
|
+
err_1 = _c.sent();
|
|
160
160
|
console.error(err_1);
|
|
161
161
|
return [3 /*break*/, 4];
|
|
162
162
|
case 4: return [2 /*return*/];
|
|
@@ -35,6 +35,7 @@ var DrawerComponent = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
35
35
|
var onOpen = props.onOpen, onClose = props.onClose, onToggle = props.onToggle, sx = props.sx, trigger = props.trigger, direction = props.direction, children = props.children, rest = __rest(props, ["onOpen", "onClose", "onToggle", "sx", "trigger", "direction", "children"]);
|
|
36
36
|
var _a = (0, react_1.useState)(false), isShowDrawerComponent = _a[0], setIsShowDrawerComponent = _a[1];
|
|
37
37
|
var _b = (0, react_1.useState)(undefined), isOpen = _b[0], setIsOpen = _b[1];
|
|
38
|
+
var DrawerComponent = (0, react_1.useMemo)(function () { return (isOpen !== undefined ? material_1.Drawer : material_1.SwipeableDrawer); }, [isOpen]);
|
|
38
39
|
var lockStatus = function () {
|
|
39
40
|
setIsOpen(isShowDrawerComponent);
|
|
40
41
|
};
|
|
@@ -70,7 +71,6 @@ var DrawerComponent = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
70
71
|
setIsShowDrawerComponent(true);
|
|
71
72
|
onOpen === null || onOpen === void 0 ? void 0 : onOpen(e);
|
|
72
73
|
};
|
|
73
|
-
var DrawerComponent = isOpen !== undefined ? material_1.Drawer : material_1.SwipeableDrawer;
|
|
74
74
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: sx, onClick: toggle, children: trigger }), (0, jsx_runtime_1.jsx)(DrawerComponent, __assign({}, rest, { sx: {
|
|
75
75
|
"& .MuiDrawer-paper": {
|
|
76
76
|
backgroundColor: "transparent",
|