tek-wallet 0.0.772 → 0.0.774
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/ActivitiesTypeSlice/index.js +1 -1
- package/dist/components/TekWallet/components/ui/ActivityItem/index.js +1 -1
- package/dist/components/TekWallet/components/ui/ConfirmSendExternal/index.js +2 -2
- package/dist/components/TekWallet/components/ui/ConfirmSwapToken/index.js +2 -2
- package/dist/components/TekWallet/components/views/ChangePasscodeView/index.js +8 -3
- package/dist/components/TekWallet/components/views/ChangePasscodeView/type.d.ts +2 -1
- package/dist/components/TekWallet/components/views/ChangePasscodeView/type.js +1 -0
- package/dist/components/TekWallet/components/views/DetailActivityView/index.js +1 -1
- package/dist/components/TekWallet/utils/stopPropagation.d.ts +2 -1
- package/dist/components/TekWallet/utils/stopPropagation.js +1 -2
- package/package.json +1 -1
- package/dist/components/TekWallet/utils/stop.d.ts +0 -3
- package/dist/components/TekWallet/utils/stop.js +0 -6
|
@@ -68,7 +68,7 @@ function ActivitiesTypeSlice(props) {
|
|
|
68
68
|
if (!activity)
|
|
69
69
|
return null;
|
|
70
70
|
var dataAsJson = JSON.stringify(activity);
|
|
71
|
-
return ((0, jsx_runtime_1.jsx)(ActivityItem_1.default, { data: dataAsJson, component: link_1.default, href: "".concat(basePath || "", "/tek-wallet/activity/").concat(activity.id) }, activity.id + index));
|
|
71
|
+
return ((0, jsx_runtime_1.jsx)(ActivityItem_1.default, { data: dataAsJson, component: link_1.default, href: "".concat(basePath || "", "/tek-wallet/activity/").concat(activity === null || activity === void 0 ? void 0 : activity.id) }, (activity === null || activity === void 0 ? void 0 : activity.id) + index + (type === null || type === void 0 ? void 0 : type.slug)));
|
|
72
72
|
}) }) }) }))] }));
|
|
73
73
|
}
|
|
74
74
|
exports.default = ActivitiesTypeSlice;
|
|
@@ -101,7 +101,7 @@ function ActivityItem(props) {
|
|
|
101
101
|
fontSize: theme.typography.fontSize12,
|
|
102
102
|
textTransform: "capitalize",
|
|
103
103
|
color: getStatusColor(),
|
|
104
|
-
}, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g2, width: "fit-content", alignItems: "flex-end", ml: "auto" }), children: [slug === type_1.TransactionSlug.SWAP && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize13, color: theme.palette.text.successStatus, textAlign: "right" }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "+", value: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.swap_total_amount, unit: " ".concat(swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.name) }) })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
104
|
+
}, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g2, width: "fit-content", alignItems: "flex-end", pointerEvents: "none", ml: "auto" }), children: [slug === type_1.TransactionSlug.SWAP && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize13, color: theme.palette.text.successStatus, textAlign: "right" }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "+", value: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.swap_total_amount, unit: " ".concat(swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.name) }) })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
105
105
|
fontSize: theme.typography.fontSize13,
|
|
106
106
|
fontWeight: theme.typography.fontWeight700,
|
|
107
107
|
color: getAmountColor(),
|
|
@@ -93,7 +93,7 @@ var react_1 = require("react");
|
|
|
93
93
|
var Result_1 = __importDefault(require("../../views/SendExternalView/components/Result"));
|
|
94
94
|
var DefaultPageLayout_1 = __importDefault(require("../../layouts/DefaultPageLayout"));
|
|
95
95
|
var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
|
|
96
|
-
var
|
|
96
|
+
var stopPropagation_1 = __importDefault(require("../../../utils/stopPropagation"));
|
|
97
97
|
var useWallet_1 = __importDefault(require("../../../hooks/useWallet"));
|
|
98
98
|
var type_1 = require("../../../services/axios/get-activities-service/type");
|
|
99
99
|
var useRealtime_1 = __importDefault(require("../../../hooks/useRealtime"));
|
|
@@ -165,7 +165,7 @@ var ConfirmSendExternal = function (_a) {
|
|
|
165
165
|
}, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: {
|
|
166
166
|
height: "100dvh",
|
|
167
167
|
width: "100dvw",
|
|
168
|
-
}, onClick:
|
|
168
|
+
}, onClick: stopPropagation_1.default, children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
|
|
169
169
|
height: "100%",
|
|
170
170
|
}, children: (0, jsx_runtime_1.jsx)(Result_1.default, { transaction: response, payload: payload, onDone: handleCloseResult }) }) }) })] }));
|
|
171
171
|
};
|
|
@@ -91,7 +91,7 @@ var ConfirmByPasscode_1 = __importDefault(require("../ConfirmByPasscode"));
|
|
|
91
91
|
var react_1 = require("react");
|
|
92
92
|
var swap_service_1 = __importDefault(require("../../../services/axios/swap-service"));
|
|
93
93
|
var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
|
|
94
|
-
var
|
|
94
|
+
var stopPropagation_1 = __importDefault(require("../../../utils/stopPropagation"));
|
|
95
95
|
var DefaultPageLayout_1 = __importDefault(require("../../layouts/DefaultPageLayout"));
|
|
96
96
|
var Result_1 = __importDefault(require("./Result"));
|
|
97
97
|
var useRealtime_1 = __importDefault(require("../../../hooks/useRealtime"));
|
|
@@ -161,7 +161,7 @@ var ConfirmSwapToken = function (props) {
|
|
|
161
161
|
}, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: {
|
|
162
162
|
height: "100dvh",
|
|
163
163
|
width: "100dvw",
|
|
164
|
-
}, onClick:
|
|
164
|
+
}, onClick: stopPropagation_1.default, children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
|
|
165
165
|
height: "100%",
|
|
166
166
|
}, children: (0, jsx_runtime_1.jsx)(Result_1.default, { transaction: response === null || response === void 0 ? void 0 : response.data, onDone: handleCloseResult }) }) }) })] }));
|
|
167
167
|
};
|
|
@@ -208,6 +208,11 @@ var ChangePasscodeView = function (props) {
|
|
|
208
208
|
* validate otp here
|
|
209
209
|
*/
|
|
210
210
|
if (value.length === passcodeLength) {
|
|
211
|
+
if (value === oldPasscode) {
|
|
212
|
+
setError(type_1.ChangePasscodeError.PASSCODE_SAME_AS_OLD);
|
|
213
|
+
setNewPasscode("");
|
|
214
|
+
return [2 /*return*/];
|
|
215
|
+
}
|
|
211
216
|
gotoStep(type_1.ChangePasscodeViewStep.CONFIRM_NEW_PASSCODE);
|
|
212
217
|
}
|
|
213
218
|
return [2 /*return*/];
|
|
@@ -328,21 +333,21 @@ var ChangePasscodeView = function (props) {
|
|
|
328
333
|
alignItems: "center",
|
|
329
334
|
gap: "1rem",
|
|
330
335
|
height: "100%",
|
|
331
|
-
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: stepsContent[type_1.ChangePasscodeViewStep.ENTER_OLD_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: oldPasscode, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD, readOnly: true }) }), unknownError, warningContent, error && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.validationError), { alignSelf: "left" }), children: error })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: stepsContent[type_1.ChangePasscodeViewStep.ENTER_OLD_PASSCODE].description })] }) }), (0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
336
|
+
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: stepsContent[type_1.ChangePasscodeViewStep.ENTER_OLD_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: oldPasscode, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD, readOnly: true }) }), unknownError, warningContent, !!error && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.validationError), { alignSelf: "left" }), children: error })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: stepsContent[type_1.ChangePasscodeViewStep.ENTER_OLD_PASSCODE].description })] }) }), (0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
332
337
|
display: "flex",
|
|
333
338
|
flexDirection: "column",
|
|
334
339
|
justifyContent: "center",
|
|
335
340
|
alignItems: "center",
|
|
336
341
|
height: "100%",
|
|
337
342
|
gap: "1rem",
|
|
338
|
-
}, 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: {
|
|
343
|
+
}, 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 }) }), !!error && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.validationError), { alignSelf: "left" }), children: type_1.ChangePasscodeError.PASSCODE_SAME_AS_OLD })), (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: {
|
|
339
344
|
display: "flex",
|
|
340
345
|
flexDirection: "column",
|
|
341
346
|
alignItems: "center",
|
|
342
347
|
justifyContent: "center",
|
|
343
348
|
height: "100%",
|
|
344
349
|
gap: "1rem",
|
|
345
|
-
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: stepsContent[type_1.ChangePasscodeViewStep.CONFIRM_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: confirmPasscode, onChange: handleConfirmPasscodeChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD, readOnly: true }) }), error && (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: error }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: stepsContent[type_1.ChangePasscodeViewStep.CONFIRM_NEW_PASSCODE].description })] }) })] }) }) }) }));
|
|
350
|
+
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: stepsContent[type_1.ChangePasscodeViewStep.CONFIRM_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: confirmPasscode, onChange: handleConfirmPasscodeChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD, readOnly: true }) }), !!error && (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: error }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: stepsContent[type_1.ChangePasscodeViewStep.CONFIRM_NEW_PASSCODE].description })] }) })] }) }) }) }));
|
|
346
351
|
};
|
|
347
352
|
exports.ChangePasscodeView = ChangePasscodeView;
|
|
348
353
|
exports.default = exports.ChangePasscodeView;
|
|
@@ -5,5 +5,6 @@ export declare enum ChangePasscodeViewStep {
|
|
|
5
5
|
}
|
|
6
6
|
export declare enum ChangePasscodeError {
|
|
7
7
|
OLD_PASSCODE_INCORRECT = "Old passcode is incorrect",
|
|
8
|
-
PASSCODE_NOT_MATCH = "The confirmation passcode does not match"
|
|
8
|
+
PASSCODE_NOT_MATCH = "The confirmation passcode does not match",
|
|
9
|
+
PASSCODE_SAME_AS_OLD = "New passcode is same as old passcode"
|
|
9
10
|
}
|
|
@@ -11,4 +11,5 @@ var ChangePasscodeError;
|
|
|
11
11
|
(function (ChangePasscodeError) {
|
|
12
12
|
ChangePasscodeError["OLD_PASSCODE_INCORRECT"] = "Old passcode is incorrect";
|
|
13
13
|
ChangePasscodeError["PASSCODE_NOT_MATCH"] = "The confirmation passcode does not match";
|
|
14
|
+
ChangePasscodeError["PASSCODE_SAME_AS_OLD"] = "New passcode is same as old passcode";
|
|
14
15
|
})(ChangePasscodeError || (exports.ChangePasscodeError = ChangePasscodeError = {}));
|
|
@@ -112,7 +112,7 @@ var DetailActivityView = function (props) {
|
|
|
112
112
|
}); })();
|
|
113
113
|
}
|
|
114
114
|
}, [activities, id, masterWallet]);
|
|
115
|
-
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "".concat(((_a = activityData === null || activityData === void 0 ? void 0 : activityData.transaction_type) === null || _a === void 0 ? void 0 : _a.name) || ""
|
|
115
|
+
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "".concat(((_a = activityData === null || activityData === void 0 ? void 0 : activityData.transaction_type) === null || _a === void 0 ? void 0 : _a.name) || "") }), sx: sx, children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { children: [activityDataStatus === ActivityDataStatus.Loading && (0, jsx_runtime_1.jsx)(LoadingView_1.default, {}), activityDataStatus === ActivityDataStatus.Filled && ((0, jsx_runtime_1.jsx)(ActivityDetail_1.default, { activityData: activityData })), activityDataStatus === ActivityDataStatus.NotFound && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { marginBottom: "auto", marginTop: "4rem" }, icon: (0, getIcon_1.default)("empty_" + "all"), description: "Activity not found" })), activityDataStatus === ActivityDataStatus.Error && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { marginBottom: "auto", marginTop: "4rem" }, icon: (0, getIcon_1.default)("error_" + "detail_activity"), description: "Something went wrong, please try again later" }))] }) }));
|
|
116
116
|
};
|
|
117
117
|
exports.DetailActivityView = DetailActivityView;
|
|
118
118
|
exports.default = exports.DetailActivityView;
|
package/package.json
CHANGED