tek-wallet 0.0.97 → 0.0.99
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.
|
@@ -52,7 +52,7 @@ var CustomOtpInput = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
52
52
|
outline: "none",
|
|
53
53
|
color: "#ffffff",
|
|
54
54
|
backgroundColor: "#ffffff29",
|
|
55
|
-
}, renderInput: function (props) { return (0, jsx_runtime_1.jsx)("input", __assign({}, props, { inputMode: "decimal" })); } }))), otpInputType !== OtpInputType.PASSWORD && ((0, jsx_runtime_1.jsx)(react_otp_input_1.default, __assign({}, rest, { renderInput: function (props) { return (0, jsx_runtime_1.jsx)("input", __assign({}, props, { inputMode: "text" })); } })))] }));
|
|
55
|
+
}, renderInput: function (props) { return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("input", __assign({}, props, { inputMode: "decimal" })), " ", (0, jsx_runtime_1.jsx)("style", { children: "input::selection {\n background-color: #f00; \n color: white; \n }" }), " "] })); } }))), otpInputType !== OtpInputType.PASSWORD && ((0, jsx_runtime_1.jsx)(react_otp_input_1.default, __assign({}, rest, { renderInput: function (props) { return (0, jsx_runtime_1.jsx)("input", __assign({}, props, { inputMode: "text" })); } })))] }));
|
|
56
56
|
});
|
|
57
57
|
CustomOtpInput.displayName = "CustomOtpInput";
|
|
58
58
|
exports.default = CustomOtpInput;
|
|
@@ -73,6 +73,7 @@ var CreateWalletView = function (props) {
|
|
|
73
73
|
var childPageLayoutRef = (0, react_2.useRef)(null);
|
|
74
74
|
var _c = (0, react_2.useState)(CreateWalletViewStep.CREATE_PASSCODE), currentStep = _c[0], setCurrentStep = _c[1];
|
|
75
75
|
var createWallet = (0, useWalletData_1.default)().createWallet;
|
|
76
|
+
var otpInputRef = (0, react_2.useRef)(null);
|
|
76
77
|
var gotoStep = function (step) {
|
|
77
78
|
var _a;
|
|
78
79
|
setCurrentStep(step);
|
|
@@ -117,17 +118,22 @@ var CreateWalletView = function (props) {
|
|
|
117
118
|
};
|
|
118
119
|
var handleConfirmOtpChange = function (value) {
|
|
119
120
|
setConfirmOtp(value);
|
|
120
|
-
console.warn("🚀 ~ handleConfirmOtpChange ~ value:", value);
|
|
121
121
|
/**
|
|
122
122
|
* validate otp here
|
|
123
123
|
*/
|
|
124
|
-
if (value.length === passcodeLength
|
|
124
|
+
if (value.length === passcodeLength) {
|
|
125
|
+
console.warn("🚀 ~ handleConfirmOtpChange ~ value:", otpInputRef);
|
|
126
|
+
// setTimeout(() => {
|
|
127
|
+
// otpInputRef.current?.blur();
|
|
128
|
+
// }, 100);
|
|
125
129
|
createWallet({
|
|
126
130
|
passcode: value,
|
|
127
131
|
appSlug: process.env.NEXT_PUBLIC_TEK_WALLET_APP_SLUG || "",
|
|
128
132
|
}, function () {
|
|
129
|
-
|
|
130
|
-
|
|
133
|
+
setTimeout(function () {
|
|
134
|
+
var _a;
|
|
135
|
+
(_a = childPageLayoutRef.current) === null || _a === void 0 ? void 0 : _a.showLoading();
|
|
136
|
+
}, 200);
|
|
131
137
|
}, function () {
|
|
132
138
|
var _a;
|
|
133
139
|
(_a = childPageLayoutRef.current) === null || _a === void 0 ? void 0 : _a.showSuccess();
|