tek-wallet 0.0.673 → 0.0.675
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/ChangePasscode/index.js +3 -1
- package/dist/components/TekWallet/components/ui/ConfirmByPasscode/index.js +21 -13
- package/dist/components/TekWallet/components/ui/ReceiveFunction/index.js +4 -2
- package/dist/components/TekWallet/components/ui/RequireConnect/index.js +4 -5
- package/dist/components/TekWallet/components/views/ChangePasscodeView/index.js +1 -1
- package/dist/components/TekWallet/hooks/useEventHandler.js +1 -0
- package/dist/components/TekWallet/hooks/useUniqueId.d.ts +1 -0
- package/dist/components/TekWallet/hooks/useUniqueId.js +10 -0
- package/dist/components/TekWallet/providers/WalletDataProviderNoImport/index.js +0 -1
- package/dist/components/TekWallet/services/axios/get-lock-tokens-list-service/index.js +1 -1
- package/package.json +2 -2
- package/dist/components/TekWallet/components/ui/InitPasscode/index.d.ts +0 -6
- package/dist/components/TekWallet/components/ui/InitPasscode/index.js +0 -61
|
@@ -67,6 +67,7 @@ var RequireConnect_1 = __importDefault(require("../RequireConnect"));
|
|
|
67
67
|
var material_1 = require("@mui/material");
|
|
68
68
|
var ChangePasscodeView_1 = __importDefault(require("../../views/ChangePasscodeView"));
|
|
69
69
|
var xhub_keyboard_1 = require("xhub-keyboard");
|
|
70
|
+
var useUniqueId_1 = require("../../../hooks/useUniqueId");
|
|
70
71
|
function ChangePasscode(_a) {
|
|
71
72
|
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
72
73
|
var getSeedPhraseViewRef = (0, react_1.useRef)(null);
|
|
@@ -80,6 +81,7 @@ function ChangePasscode(_a) {
|
|
|
80
81
|
setResetTrigger(function (prev) { return prev + "1"; });
|
|
81
82
|
}, 400);
|
|
82
83
|
};
|
|
83
|
-
|
|
84
|
+
var keyboardPrefix = (0, useUniqueId_1.useUniqueId)();
|
|
85
|
+
return ((0, jsx_runtime_1.jsx)(RequireConnect_1.default, { children: (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { onClose: onClose, ref: getSeedPhraseViewRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, trigger: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { autoFocus: true, useBrowserInput: false, htmlFor: "".concat(keyboardPrefix, "-change-passcode-keyboard"), children: (0, jsx_runtime_1.jsxs)(material_1.Box, __assign({}, rest, { sx: { position: "relative" }, children: [children, (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { position: "absolute", inset: 0, zIndex: 10 } })] })) }), children: (0, jsx_runtime_1.jsx)(ChangePasscodeView_1.default, { onBack: backAuthView, idPrefix: keyboardPrefix }, resetTrigger) }) }));
|
|
84
86
|
}
|
|
85
87
|
exports.default = ChangePasscode;
|
|
@@ -95,6 +95,8 @@ var LoadingLayout_1 = __importDefault(require("../LoadingLayout"));
|
|
|
95
95
|
var DrawerComponent_1 = __importDefault(require("../DrawerComponent"));
|
|
96
96
|
var authentication_by_passcode_service_1 = __importDefault(require("../../../services/axios/authentication-by-passcode-service"));
|
|
97
97
|
var xhub_keyboard_1 = require("xhub-keyboard");
|
|
98
|
+
var useUniqueId_1 = require("../../../hooks/useUniqueId");
|
|
99
|
+
var xhub_keyboard_2 = require("xhub-keyboard");
|
|
98
100
|
var handleVerifyPasscode = function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
99
101
|
var response, err_1;
|
|
100
102
|
return __generator(this, function (_a) {
|
|
@@ -117,20 +119,23 @@ var passcodeLength = 6;
|
|
|
117
119
|
var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
|
|
118
120
|
var onConfirmSuccess = props.onConfirmSuccess;
|
|
119
121
|
var theme = (0, ThemeProvider_1.useTheme)();
|
|
120
|
-
var _a = (0, react_1.useState)(""),
|
|
122
|
+
var _a = (0, react_1.useState)(""), passcode = _a[0], setPasscode = _a[1];
|
|
121
123
|
var loadingRef = (0, react_1.useRef)(null);
|
|
122
124
|
var _b = (0, react_1.useState)(""), authError = _b[0], setAuthError = _b[1];
|
|
125
|
+
var keyboardId = (0, useUniqueId_1.useUniqueId)("confirm-passcode-keyboard");
|
|
126
|
+
var keyboardRef = (0, react_1.useRef)(null);
|
|
123
127
|
var drawerRef = (0, react_1.useRef)(null);
|
|
128
|
+
var handleBlurAll = (0, xhub_keyboard_2.useBlurAll)().handleBlurAll;
|
|
124
129
|
var handleCleardata = function () {
|
|
125
|
-
|
|
130
|
+
setPasscode("");
|
|
126
131
|
setAuthError("");
|
|
127
132
|
};
|
|
128
|
-
var handleClose = function () {
|
|
133
|
+
var handleClose = (0, react_1.useCallback)(function () {
|
|
129
134
|
var _a, _b;
|
|
135
|
+
handleBlurAll();
|
|
130
136
|
(_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
131
|
-
handleCleardata();
|
|
132
137
|
(_b = props.onClose) === null || _b === void 0 ? void 0 : _b.call(props);
|
|
133
|
-
};
|
|
138
|
+
}, [handleBlurAll, props]);
|
|
134
139
|
(0, react_1.useImperativeHandle)(ref, function () { return ({
|
|
135
140
|
clearData: handleCleardata,
|
|
136
141
|
open: function () {
|
|
@@ -157,19 +162,22 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
157
162
|
var handleOnOpen = function () {
|
|
158
163
|
var _a;
|
|
159
164
|
(_a = props.onOpen) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
165
|
+
handleCleardata();
|
|
160
166
|
};
|
|
161
|
-
var handlePasscodeChange = function (value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
167
|
+
var handlePasscodeChange = (0, react_1.useCallback)(function (value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
162
168
|
var isAuth, err_2;
|
|
163
169
|
var _a, _b;
|
|
164
170
|
return __generator(this, function (_c) {
|
|
165
171
|
switch (_c.label) {
|
|
166
172
|
case 0:
|
|
173
|
+
if (value.length > passcodeLength)
|
|
174
|
+
return [2 /*return*/];
|
|
167
175
|
value = value === null || value === void 0 ? void 0 : value.slice(0, passcodeLength);
|
|
168
176
|
_c.label = 1;
|
|
169
177
|
case 1:
|
|
170
178
|
_c.trys.push([1, 4, , 5]);
|
|
171
|
-
|
|
172
|
-
if (!(value.length === passcodeLength)) return [3 /*break*/, 3];
|
|
179
|
+
setPasscode(value);
|
|
180
|
+
if (!(value.length === passcodeLength && value !== passcode)) return [3 /*break*/, 3];
|
|
173
181
|
(_a = loadingRef.current) === null || _a === void 0 ? void 0 : _a.startLoading();
|
|
174
182
|
return [4 /*yield*/, handleVerifyPasscode({
|
|
175
183
|
passcode: value,
|
|
@@ -182,7 +190,7 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
182
190
|
}
|
|
183
191
|
else {
|
|
184
192
|
setAuthError("Invalid passcode");
|
|
185
|
-
|
|
193
|
+
setPasscode("");
|
|
186
194
|
}
|
|
187
195
|
(_b = loadingRef.current) === null || _b === void 0 ? void 0 : _b.endLoading();
|
|
188
196
|
_c.label = 3;
|
|
@@ -194,21 +202,21 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
194
202
|
case 5: return [2 /*return*/];
|
|
195
203
|
}
|
|
196
204
|
});
|
|
197
|
-
}); };
|
|
205
|
+
}); }, [handleClose, onConfirmSuccess]);
|
|
198
206
|
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { style: {
|
|
199
207
|
width: "100%",
|
|
200
|
-
}, useBrowserInput: false, htmlFor:
|
|
208
|
+
}, useBrowserInput: false, htmlFor: keyboardId, children: props.children }), onOpen: handleOnOpen, onClose: handleOnClose, sx: {
|
|
201
209
|
width: "100%",
|
|
202
210
|
maxWidth: "calc(100dvw - 2rem)",
|
|
203
211
|
display: "flex",
|
|
204
|
-
}, children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { id:
|
|
212
|
+
}, children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { ref: keyboardRef, id: keyboardId, value: passcode, onChange: handlePasscodeChange, keyboardType: xhub_keyboard_1.KeyboardType.Text, layoutType: xhub_keyboard_1.LayoutType.Integer, children: (0, jsx_runtime_1.jsx)(LoadingLayout_1.default, { initLoading: false, ref: loadingRef, sx: {
|
|
205
213
|
backgroundColor: "transparent",
|
|
206
214
|
width: "100%",
|
|
207
215
|
}, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "Enter Passcode", onClose: handleClose, sx: {
|
|
208
216
|
backgroundColor: theme.palette.background.tertiary,
|
|
209
217
|
}, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { justifyContent: "center", alignItems: "center", gap: "0.75rem", width: "100%" }), children: [(0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { style: {
|
|
210
218
|
width: "100%",
|
|
211
|
-
}, useBrowserInput: false, htmlFor:
|
|
219
|
+
}, useBrowserInput: false, htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(OTP_1.default, { value: passcode, onChange: handlePasscodeChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.CONFIRM_BY_PASSCODE }) }), !!authError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.validationError), { alignSelf: "flex-start" }), children: authError }))] }) }) }) }) }));
|
|
212
220
|
});
|
|
213
221
|
ConfirmByPasscode.displayName = "ConfirmByPasscode";
|
|
214
222
|
exports.default = ConfirmByPasscode;
|
|
@@ -85,6 +85,7 @@ var sort_utils_1 = require("../../../utils/sort.utils");
|
|
|
85
85
|
var PageHeader_1 = __importDefault(require("../PageHeader"));
|
|
86
86
|
var BottomActionLayout_1 = __importDefault(require("../BottomActionLayout"));
|
|
87
87
|
var xhub_keyboard_1 = require("xhub-keyboard");
|
|
88
|
+
var useUniqueId_1 = require("../../../hooks/useUniqueId");
|
|
88
89
|
var ReceiveMethods;
|
|
89
90
|
(function (ReceiveMethods) {
|
|
90
91
|
ReceiveMethods["RECEIVE_INTERNAL"] = "Receive internally";
|
|
@@ -121,6 +122,7 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
121
122
|
var _h = (0, react_1.useState)(""), inputAmount = _h[0], setInputAmount = _h[1];
|
|
122
123
|
var _j = (0, react_1.useState)(""), amount = _j[0], setAmount = _j[1];
|
|
123
124
|
var _k = (0, react_1.useState)(""), amountError = _k[0], setAmountError = _k[1];
|
|
125
|
+
var keyboardId = (0, useUniqueId_1.useUniqueId)("receive-function-keyboard");
|
|
124
126
|
// const [receiveTokens, setReceiveTokens] = useState<ReceiveTokenType[]>([]);
|
|
125
127
|
var _l = (0, useReceiveData_1.default)(), receiveExternalTokens = _l.receiveExternalTokens, updateReceiveExternalToken = _l.updateReceiveExternalToken, receiveInternalTokens = _l.receiveInternalTokens, updateReceiveInternalToken = _l.updateReceiveInternalToken;
|
|
126
128
|
var receiveTokens = (0, react_1.useMemo)(function () {
|
|
@@ -387,11 +389,11 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
387
389
|
width: "100%",
|
|
388
390
|
display: "flex",
|
|
389
391
|
justifyContent: "center",
|
|
390
|
-
}, onOpen: handleAmountModalOpen, trigger: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { htmlFor:
|
|
392
|
+
}, onOpen: handleAmountModalOpen, trigger: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { htmlFor: keyboardId, children: (0, jsx_runtime_1.jsxs)(Button_1.default.Text, { sx: {
|
|
391
393
|
fontSize: theme.typography.fontSize14,
|
|
392
394
|
textTransform: "none",
|
|
393
395
|
fontWeight: theme.typography.fontWeight500,
|
|
394
|
-
}, children: [amount ? "Edit" : "+ Set", " amount"] }) }), children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { id:
|
|
396
|
+
}, children: [amount ? "Edit" : "+ Set", " amount"] }) }), children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { id: keyboardId, onChange: handleChangeAmount, keyboardType: xhub_keyboard_1.KeyboardType.Double, value: inputAmount === null || inputAmount === void 0 ? void 0 : inputAmount.toString(), keyboardId: "amount-keyboard-id", children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { onClose: function () { var _a; return (_a = amountDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close(); }, title: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.fieldTitle), children: [amount ? "Edit" : "Set", " ", selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name, " amount"] }), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Input, { ref: amountInputRef, elementsAcceptIds: ["amount-keyboard-id"], value: inputAmount === null || inputAmount === void 0 ? void 0 : inputAmount.toString(), displayType: xhub_keyboard_1.DisplayType.Double, rightElement: (0, jsx_runtime_1.jsx)(Button_1.default.Secondary, { onClick: handleClickMaxAmount, sx: __assign({}, theme.mixins.smallButton), children: "Max" }) }) }), amountError && (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: amountError }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { width: "100%", mt: theme.mixins.customMargin.m8, gap: theme.mixins.gaps.g12 }), children: [!!amount && (0, jsx_runtime_1.jsx)(Button_1.default.Text, { onClick: handleUnset, children: "Unset" }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { flex: 1 }, onClick: handleContinue, status: !!amountError ? Button_1.BUTTON_STATUS.DISABLED : Button_1.BUTTON_STATUS.ENABLED, children: "Continue" })] })] }) }) }) })] }) }, "slide_step_".concat(ReceiveStep.SHOW_QR_CODE))] }) }) }) }) }) }) }));
|
|
395
397
|
});
|
|
396
398
|
exports.ReceiveFunction.displayName = "ReceiveFunction";
|
|
397
399
|
exports.default = exports.ReceiveFunction;
|
|
@@ -51,7 +51,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
51
51
|
exports.RequireConnect = RequireConnect;
|
|
52
52
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
53
53
|
var DrawerComponent_1 = __importStar(require("../DrawerComponent"));
|
|
54
|
-
var uuid_1 = require("uuid");
|
|
55
54
|
var AuthView_1 = __importDefault(require("../../views/AuthView"));
|
|
56
55
|
var useWalletData_1 = __importDefault(require("../../../hooks/useWalletData"));
|
|
57
56
|
var react_1 = require("react");
|
|
@@ -59,13 +58,13 @@ var material_1 = require("@mui/material");
|
|
|
59
58
|
var AuthViewSignIn_1 = __importDefault(require("../../views/AuthViewSignIn"));
|
|
60
59
|
var ChangePasscodeView_1 = __importDefault(require("../../views/ChangePasscodeView"));
|
|
61
60
|
var xhub_keyboard_1 = require("xhub-keyboard");
|
|
61
|
+
var useUniqueId_1 = require("../../../hooks/useUniqueId");
|
|
62
62
|
function RequireConnect(_a) {
|
|
63
63
|
var children = _a.children, signIn = _a.signIn, component = _a.component, sx = _a.sx;
|
|
64
64
|
var authViewRef = (0, react_1.useRef)(null);
|
|
65
65
|
var initPasscodeRef = (0, react_1.useRef)(null);
|
|
66
|
-
var _b = (0, useWalletData_1.default)(), isInitPasscode = _b.isInitPasscode, isSSO = _b.isSSO, isAuthenticated = _b.isAuthenticated;
|
|
67
|
-
var
|
|
68
|
-
var idPrefix = idPrefixRef.current;
|
|
66
|
+
var _b = (0, useWalletData_1.default)(), isInitPasscode = _b.isInitPasscode, isSSO = _b.isSSO, isAuthenticated = _b.isAuthenticated, masterWallet = _b.masterWallet;
|
|
67
|
+
var idPrefix = (0, useUniqueId_1.useUniqueId)();
|
|
69
68
|
var backAuthView = function () {
|
|
70
69
|
var _a;
|
|
71
70
|
(_a = authViewRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
@@ -86,7 +85,7 @@ function RequireConnect(_a) {
|
|
|
86
85
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative" }, sx), component: component || "div", children: [children, (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { position: "absolute", inset: 0, zIndex: 10 }, onClick: handleOpenAuthView, children: (0, jsx_runtime_1.jsxs)(DrawerComponent_1.default, { ref: authViewRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, onClick: stopPropagation, children: [isSSO && (0, jsx_runtime_1.jsx)(AuthViewSignIn_1.default, { onBack: backAuthView, onSignIn: signIn }), !isSSO && (0, jsx_runtime_1.jsx)(AuthView_1.default, { onBack: backAuthView })] }) })] }) }));
|
|
87
86
|
}
|
|
88
87
|
if (!isInitPasscode) {
|
|
89
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative" }, sx), component: component || "div", onClick: function () {
|
|
88
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative", pointerEvents: masterWallet ? "initial" : "none" }, sx), component: component || "div", onClick: function () {
|
|
90
89
|
var _a;
|
|
91
90
|
(_a = initPasscodeRef.current) === null || _a === void 0 ? void 0 : _a.open();
|
|
92
91
|
}, children: [children, (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { autoFocus: true, useBrowserInput: false, htmlFor: "".concat(idPrefix, "-init-passcode-keyboard"), style: {
|
|
@@ -318,7 +318,7 @@ var ChangePasscodeView = function (props) {
|
|
|
318
318
|
alignItems: "center",
|
|
319
319
|
height: "100%",
|
|
320
320
|
gap: "1rem",
|
|
321
|
-
}, children: [
|
|
321
|
+
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: stepsContent[type_1.ChangePasscodeViewStep.ENTER_NEW_PASSCODE].title }), (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { useBrowserInput: false, htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(OTP_1.default, { value: newPasscode, onChange: handleNewPasscodeChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD, readOnly: true }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: stepsContent[type_1.ChangePasscodeViewStep.ENTER_NEW_PASSCODE].description })] }) }), (0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
322
322
|
display: "flex",
|
|
323
323
|
flexDirection: "column",
|
|
324
324
|
alignItems: "center",
|
|
@@ -41,6 +41,7 @@ var useEventHandler = function () {
|
|
|
41
41
|
showActivities === null || showActivities === void 0 ? void 0 : showActivities();
|
|
42
42
|
break;
|
|
43
43
|
default:
|
|
44
|
+
updateWalletDetail();
|
|
44
45
|
break;
|
|
45
46
|
}
|
|
46
47
|
}, [updateActivities, updateWalletDetail, updateWithdrawToken, updateSendInternalToken]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useUniqueId: (name?: string) => string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useUniqueId = void 0;
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
var uuid_1 = require("uuid");
|
|
6
|
+
var useUniqueId = function (name) {
|
|
7
|
+
var id = (0, react_1.useRef)((0, uuid_1.v4)());
|
|
8
|
+
return "id-".concat(id.current, "-").concat(name || "");
|
|
9
|
+
};
|
|
10
|
+
exports.useUniqueId = useUniqueId;
|
|
@@ -130,7 +130,6 @@ function WalletDataProviderNoImport(_a) {
|
|
|
130
130
|
return [4 /*yield*/, (0, getBalanceService_1.default)()];
|
|
131
131
|
case 1:
|
|
132
132
|
response = _a.sent();
|
|
133
|
-
console.warn("🚀 ~ updateWalletDetail ~ response:", response);
|
|
134
133
|
setTokens(response === null || response === void 0 ? void 0 : response.balances);
|
|
135
134
|
setIsInitPasscode(response === null || response === void 0 ? void 0 : response.is_initialized_passcode);
|
|
136
135
|
setMasterWallet(response === null || response === void 0 ? void 0 : response.address);
|
|
@@ -57,7 +57,7 @@ var getLockTokenList = function (query) { return __awaiter(void 0, void 0, void
|
|
|
57
57
|
return __generator(this, function (_a) {
|
|
58
58
|
switch (_a.label) {
|
|
59
59
|
case 0:
|
|
60
|
-
params = __assign(__assign({}, query), { transactionType: type_1.TransactionSlug.
|
|
60
|
+
params = __assign(__assign({}, query), { transactionType: type_1.TransactionSlug.LockedBalances });
|
|
61
61
|
return [4 /*yield*/, (0, get_config_tokens_list_service_1.default)(params)];
|
|
62
62
|
case 1:
|
|
63
63
|
response = _a.sent();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tek-wallet",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.675",
|
|
4
4
|
"description": "A custom React provider with TypeScript support",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"ton-core": "^0.53.0",
|
|
62
62
|
"ton-crypto": "^3.2.0",
|
|
63
63
|
"uuid": "^11.1.0",
|
|
64
|
-
"xhub-keyboard": "^0.0.
|
|
64
|
+
"xhub-keyboard": "^0.0.22"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { GeneralProps } from "../../../types/ui";
|
|
2
|
-
export interface InitPasscodeProps extends GeneralProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
}
|
|
5
|
-
export declare function InitPasscode({ children }: InitPasscodeProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export default InitPasscode;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.InitPasscode = InitPasscode;
|
|
41
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
|
-
var DrawerComponent_1 = __importStar(require("../DrawerComponent"));
|
|
43
|
-
var react_1 = require("react");
|
|
44
|
-
var ChangePasscodeView_1 = __importDefault(require("../../views/ChangePasscodeView"));
|
|
45
|
-
var xhub_keyboard_1 = require("xhub-keyboard");
|
|
46
|
-
function InitPasscode(_a) {
|
|
47
|
-
var children = _a.children;
|
|
48
|
-
var getSeedPhraseViewRef = (0, react_1.useRef)(null);
|
|
49
|
-
var backAuthView = function () {
|
|
50
|
-
var _a;
|
|
51
|
-
(_a = getSeedPhraseViewRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
52
|
-
};
|
|
53
|
-
var _b = (0, react_1.useState)("1"), resetTrigger = _b[0], setResetTrigger = _b[1];
|
|
54
|
-
var onClose = function () {
|
|
55
|
-
setTimeout(function () {
|
|
56
|
-
setResetTrigger(function (prev) { return prev + "1"; });
|
|
57
|
-
}, 400);
|
|
58
|
-
};
|
|
59
|
-
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { onClose: onClose, ref: getSeedPhraseViewRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, trigger: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { autoFocus: true, useBrowserInput: false, htmlFor: "init-passcode-keyboard", style: { width: "100%", height: "100%" }, children: children }), children: (0, jsx_runtime_1.jsx)(ChangePasscodeView_1.default, { onBack: backAuthView, isInitPasscode: true }, resetTrigger) }));
|
|
60
|
-
}
|
|
61
|
-
exports.default = InitPasscode;
|