tek-wallet 0.0.464 → 0.0.465
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.
|
@@ -86,7 +86,7 @@ function ActivityItem(props) {
|
|
|
86
86
|
return ((0, jsx_runtime_1.jsxs)(material_1.ListItemButton, __assign({ sx: __assign(__assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, backgroundColor: theme.palette.background.white16, borderRadius: theme.mixins.customRadius.r16, p: theme.mixins.customPadding.p12, flexGrow: "unset", boxShadow: theme.shadows[1] }), sx) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
87
87
|
width: "fit-content",
|
|
88
88
|
height: "fit-content",
|
|
89
|
-
}, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { src: type === null || type === void 0 ? void 0 : type.
|
|
89
|
+
}, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { src: type === null || type === void 0 ? void 0 : type.link, width: 24 }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.activityTitle, children: type === null || type === void 0 ? void 0 : type.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.activityDescription, children: descriptionElement }), status !== type_1.TransactionStatus.Success && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [status === type_1.TransactionStatus.Processing && (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "secondary", size: 16 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
90
90
|
fontSize: theme.typography.fontSize12,
|
|
91
91
|
textTransform: "capitalize",
|
|
92
92
|
color: getStatusColor(),
|
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
// import Icon from "../Icon";
|
|
20
20
|
// import Fees from "../Fees";
|
|
21
21
|
// import { FeesDataType } from "../../../services/axios/get-est-fee-service/type";
|
|
22
|
+
// import { NetworkData } from "../../../services/axios/type";
|
|
22
23
|
// interface SendExternalTokenProps extends Omit<ConfirmLayoutProps, "action"> {
|
|
23
|
-
// sendExternalData: SendExternalBody;
|
|
24
|
+
// sendExternalData: Omit<SendExternalBody, "network"> & { network: NetworkData };
|
|
24
25
|
// onSuccess?: (data: SendExternalResponse) => any;
|
|
25
26
|
// }
|
|
26
27
|
// export interface SendExternalTokenRef {
|
|
@@ -81,7 +82,7 @@
|
|
|
81
82
|
// try {
|
|
82
83
|
// console.warn("🚀 ~ handleSendExternalToken ~ sendExternalData:", props.sendExternalData, passcode);
|
|
83
84
|
// setButtonStatus(BUTTON_STATUS.LOADING);
|
|
84
|
-
// const response = await sendExternalService(props.sendExternalData);
|
|
85
|
+
// const response = await sendExternalService({ ...props.sendExternalData, network: network?.slug });
|
|
85
86
|
// console.warn("🚀 ~ handleSendExternalToken ~ response:", response);
|
|
86
87
|
// if (response.success) {
|
|
87
88
|
// confirmLayoutDrawerRef.current?.close();
|
|
@@ -144,8 +145,8 @@
|
|
|
144
145
|
// ml: "auto",
|
|
145
146
|
// }}
|
|
146
147
|
// >
|
|
147
|
-
//
|
|
148
|
-
// <Text sx={{ ...theme.mixins.value }}>{
|
|
148
|
+
// <Icon width={20} src={network?.icon} />
|
|
149
|
+
// <Text sx={{ ...theme.mixins.value }}>{network?.name}</Text>
|
|
149
150
|
// </Box>
|
|
150
151
|
// }
|
|
151
152
|
// />
|
|
@@ -522,11 +522,14 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
522
522
|
});
|
|
523
523
|
}); };
|
|
524
524
|
var handleSendInternal = function (passcode) { return __awaiter(void 0, void 0, void 0, function () {
|
|
525
|
-
var response;
|
|
526
|
-
|
|
527
|
-
|
|
525
|
+
var response, err_1;
|
|
526
|
+
var _a, _b;
|
|
527
|
+
return __generator(this, function (_c) {
|
|
528
|
+
switch (_c.label) {
|
|
528
529
|
case 0:
|
|
530
|
+
_c.trys.push([0, 2, , 3]);
|
|
529
531
|
console.warn("withdraw internal");
|
|
532
|
+
setSendButtonStatus(Button_1.BUTTON_STATUS.LOADING);
|
|
530
533
|
return [4 /*yield*/, (0, send_internal_service_1.default)({
|
|
531
534
|
amount: "".concat(amount),
|
|
532
535
|
to_address: recipientAddress || "",
|
|
@@ -534,14 +537,32 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
534
537
|
passcode: passcode,
|
|
535
538
|
})];
|
|
536
539
|
case 1:
|
|
537
|
-
response =
|
|
540
|
+
response = _c.sent();
|
|
538
541
|
console.warn("🚀 ~ handleSendInternal ~ response:", response);
|
|
539
|
-
|
|
542
|
+
if (response.success) {
|
|
543
|
+
close();
|
|
544
|
+
(_a = confirmLayoutDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
545
|
+
setSendButtonStatus(Button_1.BUTTON_STATUS.ENABLED);
|
|
546
|
+
(_b = props.onSendSuccess) === null || _b === void 0 ? void 0 : _b.call(props, response);
|
|
547
|
+
}
|
|
548
|
+
else {
|
|
549
|
+
throw new Error("Send internal failed");
|
|
550
|
+
}
|
|
551
|
+
return [3 /*break*/, 3];
|
|
552
|
+
case 2:
|
|
553
|
+
err_1 = _c.sent();
|
|
554
|
+
console.error(err_1);
|
|
555
|
+
setSendButtonStatus(Button_1.BUTTON_STATUS.ERROR);
|
|
556
|
+
setTimeout(function () {
|
|
557
|
+
setSendButtonStatus(Button_1.BUTTON_STATUS.ENABLED);
|
|
558
|
+
}, 1200);
|
|
559
|
+
return [3 /*break*/, 3];
|
|
560
|
+
case 3: return [2 /*return*/];
|
|
540
561
|
}
|
|
541
562
|
});
|
|
542
563
|
}); };
|
|
543
564
|
var handleSendExternal = function (passcode) { return __awaiter(void 0, void 0, void 0, function () {
|
|
544
|
-
var response,
|
|
565
|
+
var response, err_2;
|
|
545
566
|
var _a, _b;
|
|
546
567
|
return __generator(this, function (_c) {
|
|
547
568
|
switch (_c.label) {
|
|
@@ -571,8 +592,8 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
571
592
|
}
|
|
572
593
|
return [3 /*break*/, 3];
|
|
573
594
|
case 2:
|
|
574
|
-
|
|
575
|
-
console.error(
|
|
595
|
+
err_2 = _c.sent();
|
|
596
|
+
console.error(err_2);
|
|
576
597
|
setSendButtonStatus(Button_1.BUTTON_STATUS.ERROR);
|
|
577
598
|
setTimeout(function () {
|
|
578
599
|
setSendButtonStatus(Button_1.BUTTON_STATUS.ENABLED);
|