tek-wallet 0.0.767 → 0.0.769
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/ActivityDetail/index.js +6 -2
- package/dist/components/TekWallet/components/ui/ChangePasscode/index.js +1 -1
- package/dist/components/TekWallet/components/ui/ConfirmByPasscode/index.js +3 -3
- package/dist/components/TekWallet/components/ui/ConfirmSendExternal/index.d.ts +2 -2
- package/dist/components/TekWallet/components/ui/ConfirmSendExternal/index.js +1 -1
- package/dist/components/TekWallet/components/ui/ConfirmSwapToken/Result.js +2 -2
- package/dist/components/TekWallet/components/ui/DetailSwap/index.js +1 -1
- package/dist/components/TekWallet/components/ui/DrawerComponent/index.d.ts +1 -1
- package/dist/components/TekWallet/components/ui/DrawerComponent/index.js +1 -1
- package/dist/components/TekWallet/components/ui/HistorySwap/index.js +1 -1
- package/dist/components/TekWallet/components/ui/QRCode/index.js +1 -1
- package/dist/components/TekWallet/components/ui/QrCodeReader/index.js +43 -12
- package/dist/components/TekWallet/components/ui/ReceiveFunction/index.js +5 -3
- package/dist/components/TekWallet/components/ui/ReceiveHistory/index.js +1 -1
- package/dist/components/TekWallet/components/ui/SwapFunction/index.js +2 -2
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/summary/infoSummary.js +19 -9
- package/dist/components/TekWallet/components/ui/WithdrawFunction/index.js +1 -1
- package/dist/components/TekWallet/components/views/AssetView/index.js +2 -35
- package/dist/components/TekWallet/components/views/ChangePasscodeView/index.js +7 -5
- package/dist/components/TekWallet/components/views/DetailActivityView/LoadingView.d.ts +2 -0
- package/dist/components/TekWallet/components/views/DetailActivityView/LoadingView.js +29 -0
- package/dist/components/TekWallet/components/views/DetailActivityView/index.js +92 -5
- package/dist/components/TekWallet/components/views/SendExternalView/components/Result.js +4 -4
- package/dist/components/TekWallet/components/views/SendExternalView/components/Summary.js +5 -5
- package/dist/components/TekWallet/components/views/SendExternalView/index.js +3 -2
- package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +10 -0
- package/dist/components/TekWallet/components/views/SendInternalView/components/Result.js +3 -3
- package/dist/components/TekWallet/components/views/SendInternalView/components/Summary.js +3 -3
- package/dist/components/TekWallet/components/views/SendInternalView/index.js +3 -4
- package/dist/components/TekWallet/components/views/SwapView/index.js +4 -3
- package/dist/components/TekWallet/hooks/useEventHandler.js +0 -1
- package/dist/components/TekWallet/services/axios/get-activities-service/type.d.ts +1 -0
- package/dist/components/TekWallet/services/axios/get-activity-service/index.d.ts +3 -0
- package/dist/components/TekWallet/services/axios/get-activity-service/index.js +54 -0
- package/dist/components/TekWallet/services/axios/get-activity-service/type.d.ts +10 -0
- package/dist/components/TekWallet/services/axios/get-activity-service/type.js +2 -0
- package/package.json +1 -1
- package/dist/components/TekWallet/components/ui/QrCodeReader/reader.json +0 -2644
|
@@ -58,6 +58,9 @@ function ActivityDetail(props) {
|
|
|
58
58
|
return masterWallet;
|
|
59
59
|
return activityData === null || activityData === void 0 ? void 0 : activityData.to_address;
|
|
60
60
|
}, [activityData, isSwap, masterWallet]);
|
|
61
|
+
var message = (0, react_2.useMemo)(function () {
|
|
62
|
+
return activityData === null || activityData === void 0 ? void 0 : activityData.message;
|
|
63
|
+
}, [activityData]);
|
|
61
64
|
var getStatusColor = (0, react_1.useCallback)(function () {
|
|
62
65
|
switch (status) {
|
|
63
66
|
case type_1.TransactionStatus.Processing:
|
|
@@ -77,9 +80,10 @@ function ActivityDetail(props) {
|
|
|
77
80
|
}, [isIncrease, theme]);
|
|
78
81
|
if (!activityData)
|
|
79
82
|
return null;
|
|
80
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.row), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: currency === null || currency === void 0 ? void 0 : currency.link, width: 64, sx: {
|
|
83
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { filter: "drop-shadow(0 0 0.5rem #00000016)" }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: currency === null || currency === void 0 ? void 0 : currency.link, width: 64, sx: {
|
|
81
84
|
borderRadius: theme.mixins.customRadius.full,
|
|
82
85
|
border: isSwap ? "0.25rem white solid" : "none",
|
|
86
|
+
// boxShadow: "0 0 20px 2px #00000029",
|
|
83
87
|
// ml: "-0.5rem",
|
|
84
88
|
} }), (swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.link) && ((0, jsx_runtime_1.jsx)(Icon_1.default, { src: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.link, width: 64, sx: {
|
|
85
89
|
borderRadius: theme.mixins.customRadius.full,
|
|
@@ -91,6 +95,6 @@ function ActivityDetail(props) {
|
|
|
91
95
|
fontSize: theme.typography.fontSize12,
|
|
92
96
|
textTransform: "capitalize",
|
|
93
97
|
color: getStatusColor(),
|
|
94
|
-
}, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.paper), { p: 0, width: "100%" }), children: [isReceive && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: activityData === null || activityData === void 0 ? void 0 : activityData.from_address, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "From" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g24, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: activityData === null || activityData === void 0 ? void 0 : activityData.from_address }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16 }, children: SvgPath_1.IC_COPY })] })] }) })), !!toAddress && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: toAddress, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Recipient address" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g24, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: toAddress }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16 }, children: SvgPath_1.IC_COPY })] })] }) }))] })] }));
|
|
98
|
+
}, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.paper), { p: 0, width: "100%" }), children: [isReceive && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: activityData === null || activityData === void 0 ? void 0 : activityData.from_address, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "From" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g24, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: activityData === null || activityData === void 0 ? void 0 : activityData.from_address }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16 }, children: SvgPath_1.IC_COPY })] })] }) })), !!toAddress && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: toAddress, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Recipient address" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g24, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: toAddress }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16 }, children: SvgPath_1.IC_COPY })] })] }) })), !!message && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Message" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g24, alignItems: "center" }), children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { textAlign: "left" }), children: message }) })] }))] })] }));
|
|
95
99
|
}
|
|
96
100
|
exports.default = ActivityDetail;
|
|
@@ -82,6 +82,6 @@ function ChangePasscode(_a) {
|
|
|
82
82
|
}, 400);
|
|
83
83
|
};
|
|
84
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, {
|
|
85
|
+
return ((0, jsx_runtime_1.jsx)(RequireConnect_1.default, { children: (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { onDone: 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) }) }));
|
|
86
86
|
}
|
|
87
87
|
exports.default = ChangePasscode;
|
|
@@ -115,7 +115,7 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
115
115
|
var _a, _b;
|
|
116
116
|
handleBlurAll();
|
|
117
117
|
(_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
118
|
-
(_b = props.
|
|
118
|
+
(_b = props.onDone) === null || _b === void 0 ? void 0 : _b.call(props);
|
|
119
119
|
}, [handleBlurAll, props]);
|
|
120
120
|
(0, react_1.useImperativeHandle)(ref, function () { return ({
|
|
121
121
|
clearData: handleCleardata,
|
|
@@ -138,7 +138,7 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
138
138
|
var handleOnClose = function () {
|
|
139
139
|
var _a;
|
|
140
140
|
handleCleardata();
|
|
141
|
-
(_a = props.
|
|
141
|
+
(_a = props.onDone) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
142
142
|
};
|
|
143
143
|
var handleOnOpen = function () {
|
|
144
144
|
var _a;
|
|
@@ -189,7 +189,7 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
189
189
|
}); }, [handleClose, handleVerifyPasscode, onConfirmSuccess, passcode]);
|
|
190
190
|
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { style: {
|
|
191
191
|
width: "100%",
|
|
192
|
-
}, useBrowserInput: false, htmlFor: keyboardId, children: props.children }), onOpen: handleOnOpen,
|
|
192
|
+
}, useBrowserInput: false, htmlFor: keyboardId, children: props.children }), onOpen: handleOnOpen, onDone: handleOnClose, triggerStatus: props.triggerStatus, sx: __assign({ width: "100%", maxWidth: "calc(100dvw - 2rem)", display: "flex" }, sx), 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, styles: {
|
|
193
193
|
keyboardContainer: {
|
|
194
194
|
display: isLocked ? "none" : "block",
|
|
195
195
|
},
|
|
@@ -14,7 +14,7 @@ export interface ConfirmSendExternalProps extends Omit<ConfirmLayoutProps, "acti
|
|
|
14
14
|
onError?: (error: Error | unknown) => void;
|
|
15
15
|
children?: React.ReactNode;
|
|
16
16
|
sx?: SxProps;
|
|
17
|
-
|
|
17
|
+
onDone?: ReactEventHandler;
|
|
18
18
|
}
|
|
19
|
-
export declare const ConfirmSendExternal: ({ payload, onSuccess, onStart, onFinally, onError, children, sx,
|
|
19
|
+
export declare const ConfirmSendExternal: ({ payload, onSuccess, onStart, onFinally, onError, children, sx, onDone, }: ConfirmSendExternalProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export default ConfirmSendExternal;
|
|
@@ -98,7 +98,7 @@ 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"));
|
|
100
100
|
var ConfirmSendExternal = function (_a) {
|
|
101
|
-
var payload = _a.payload, onSuccess = _a.onSuccess, onStart = _a.onStart, onFinally = _a.onFinally, onError = _a.onError, children = _a.children, sx = _a.sx, onDone = _a.
|
|
101
|
+
var payload = _a.payload, onSuccess = _a.onSuccess, onStart = _a.onStart, onFinally = _a.onFinally, onError = _a.onError, children = _a.children, sx = _a.sx, onDone = _a.onDone;
|
|
102
102
|
var network = payload.network;
|
|
103
103
|
var _b = (0, react_1.useState)(), response = _b[0], setResponse = _b[1];
|
|
104
104
|
var thisTransactionId = (0, react_1.useRef)("");
|
|
@@ -98,11 +98,11 @@ function Result(props) {
|
|
|
98
98
|
height: 20,
|
|
99
99
|
borderRadius: "999px",
|
|
100
100
|
} }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { color: "inherit" }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: toAmount }) })] }) }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Price", titleStyle: {
|
|
101
|
-
fontSize: "0.
|
|
101
|
+
fontSize: "0.875rem",
|
|
102
102
|
fontWeight: 500,
|
|
103
103
|
color: "gray.700",
|
|
104
104
|
}, value: !!toTokenRate && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: ["1 ", fromToken === null || fromToken === void 0 ? void 0 : fromToken.name, " ~ ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: toTokenRate, unit: toToken === null || toToken === void 0 ? void 0 : toToken.name })] })), isAligned: true }), !!(transaction === null || transaction === void 0 ? void 0 : transaction.date_created) && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Date", titleStyle: {
|
|
105
|
-
fontSize: "0.
|
|
105
|
+
fontSize: "0.875rem",
|
|
106
106
|
fontWeight: 500,
|
|
107
107
|
color: "gray.700",
|
|
108
108
|
}, value: !!toTokenRate && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: formatDate(transaction === null || transaction === void 0 ? void 0 : transaction.date_created, true) })), isAligned: true }))] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
@@ -28,7 +28,7 @@ var DetailSwap = function (props) {
|
|
|
28
28
|
color: theme.palette.text.accent2,
|
|
29
29
|
fontSize: theme.typography.fontSize13,
|
|
30
30
|
fontWeight: theme.typography.fontWeight400,
|
|
31
|
-
}, children: "Transaction summary
|
|
31
|
+
}, children: "Transaction summary" }) }), (0, jsx_runtime_1.jsx)(LineValue_1.default, { field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
32
32
|
color: theme.palette.text.accent,
|
|
33
33
|
fontSize: theme.typography.fontSize12,
|
|
34
34
|
fontWeight: theme.typography.fontWeight400,
|
|
@@ -12,7 +12,7 @@ export declare enum DRAWER_TRIGGER_STATUS {
|
|
|
12
12
|
}
|
|
13
13
|
export interface DrawerComponentProps extends Omit<GeneralProps, "onClick" | "sx">, Omit<SwipeableDrawerProps, "onClose" | "onToggle" | "onOpen"> {
|
|
14
14
|
onOpen?: UnknownFunction;
|
|
15
|
-
|
|
15
|
+
onDone?: UnknownFunction;
|
|
16
16
|
trigger?: React.ReactNode;
|
|
17
17
|
onToggle?: (status?: boolean) => unknown;
|
|
18
18
|
direction?: DRAWER_DIRECTION;
|
|
@@ -39,7 +39,7 @@ var DRAWER_TRIGGER_STATUS;
|
|
|
39
39
|
DRAWER_TRIGGER_STATUS["DISABLED"] = "DISABLED";
|
|
40
40
|
})(DRAWER_TRIGGER_STATUS || (exports.DRAWER_TRIGGER_STATUS = DRAWER_TRIGGER_STATUS = {}));
|
|
41
41
|
var DrawerComponent = (0, react_1.forwardRef)(function (props, ref) {
|
|
42
|
-
var onOpen = props.onOpen, onClose = props.
|
|
42
|
+
var onOpen = props.onOpen, onClose = props.onDone, onToggle = props.onToggle, sx = props.sx, trigger = props.trigger, direction = props.direction, children = props.children, _a = props.triggerStatus, triggerStatus = _a === void 0 ? DRAWER_TRIGGER_STATUS.ENABLED : _a, onDismiss = props.onDismiss, disableSwipe = props.disableSwipe, className = props.className, rest = __rest(props, ["onOpen", "onDone", "onToggle", "sx", "trigger", "direction", "children", "triggerStatus", "onDismiss", "disableSwipe", "className"]);
|
|
43
43
|
var _b = (0, react_1.useState)(false), isShowDrawerComponent = _b[0], setIsShowDrawerComponent = _b[1];
|
|
44
44
|
var _c = (0, react_1.useState)(undefined), isOpen = _c[0], setIsOpen = _c[1];
|
|
45
45
|
var lockStatus = function () {
|
|
@@ -400,7 +400,7 @@ var HistorySwap = function (props) {
|
|
|
400
400
|
width: "100%",
|
|
401
401
|
overflow: "hidden",
|
|
402
402
|
},
|
|
403
|
-
}, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT,
|
|
403
|
+
}, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, onDone: handleOnClose, children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
|
|
404
404
|
padding: 0,
|
|
405
405
|
width: "100%",
|
|
406
406
|
}, children: selectedItem && ((0, jsx_runtime_1.jsx)(DetailSwapResult_1.default, { onClose: handleCloseDetailDrawer, swapData: {
|
|
@@ -4,7 +4,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
4
4
|
var qrcode_react_1 = require("qrcode.react");
|
|
5
5
|
function QRCode(props) {
|
|
6
6
|
var value = props.value, _a = props.size, size = _a === void 0 ? 156 : _a, logo = props.logo, title = props.title, _b = props.bgColor, bgColor = _b === void 0 ? "#ffffff" : _b;
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)(qrcode_react_1.QRCodeCanvas, { value: value, title: title, size: size, bgColor: bgColor, fgColor: "#044C2F", level: "L", minVersion: 8, marginSize:
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)(qrcode_react_1.QRCodeCanvas, { value: value, title: title, size: size, bgColor: bgColor, fgColor: "#044C2F", level: "L", minVersion: 8, marginSize: 3, imageSettings: {
|
|
8
8
|
src: logo || "/",
|
|
9
9
|
x: undefined,
|
|
10
10
|
y: undefined,
|
|
@@ -1,19 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
39
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
40
|
var material_1 = require("@mui/material");
|
|
8
|
-
var DrawerComponent_1 =
|
|
41
|
+
var DrawerComponent_1 = __importStar(require("../DrawerComponent"));
|
|
9
42
|
var react_1 = require("react");
|
|
10
43
|
var react_qr_scanner_1 = require("@yudiel/react-qr-scanner");
|
|
11
44
|
var AppBackDrop_1 = __importDefault(require("../AppBackDrop"));
|
|
12
45
|
var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
|
|
13
46
|
var PageHeader_1 = __importDefault(require("../PageHeader"));
|
|
14
47
|
var providers_1 = require("../../../providers");
|
|
15
|
-
var lottie_react_1 = __importDefault(require("lottie-react"));
|
|
16
|
-
var reader_json_1 = __importDefault(require("./reader.json"));
|
|
17
48
|
var STYLES = {
|
|
18
49
|
borderWidth: "4px",
|
|
19
50
|
borderColor: "#ffffff",
|
|
@@ -89,7 +120,7 @@ var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
89
120
|
};
|
|
90
121
|
}, []);
|
|
91
122
|
var theme = (0, providers_1.useTheme)();
|
|
92
|
-
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { trigger: props.children, ref: drawerRef,
|
|
123
|
+
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { trigger: props.children, ref: drawerRef, onDone: onClose, onOpen: onOpen, sx: sx, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, className: className, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: {
|
|
93
124
|
backgroundColor: "transparent !important",
|
|
94
125
|
}, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { hideBack: true, title: "Scan QR code", sx: {
|
|
95
126
|
position: "absolute",
|
|
@@ -118,14 +149,14 @@ var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
118
149
|
transform: "translateX(-50%) translateY(-50%)",
|
|
119
150
|
boxShadow: "0 0 2px max(50vw, 50dvh) rgba(0, 0, 0, 0.36)",
|
|
120
151
|
color: "#C5E99F",
|
|
121
|
-
}, children: [(0, jsx_runtime_1.jsx)("div", { className: "
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
152
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { className: "move-up-down-animation", style: {
|
|
153
|
+
position: "absolute",
|
|
154
|
+
left: 0,
|
|
155
|
+
top: 0,
|
|
156
|
+
width: "100%",
|
|
157
|
+
height: "100%",
|
|
158
|
+
borderTop: "2px solid currentColor",
|
|
159
|
+
} }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
129
160
|
position: "absolute",
|
|
130
161
|
borderTopLeftRadius: STYLES.borderRadius,
|
|
131
162
|
top: "-".concat(STYLES.borderWidth),
|
|
@@ -429,7 +429,7 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
429
429
|
var handleClearSearch = function () {
|
|
430
430
|
setSearchValue("");
|
|
431
431
|
};
|
|
432
|
-
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: props.onOpen,
|
|
432
|
+
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: props.onOpen, onDone: handleOnClose, sx: props.sx, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: RECEIVE_STEP_NAME[ReceiveStep.SELECT_METHOD], onClose: close, children: (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: stepDrawerRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, sx: {
|
|
433
433
|
width: "100%",
|
|
434
434
|
}, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, height: "fit-content", width: "100%" }), children: [functionsList.includes(ReceiveMethods.RECEIVE_INTERNAL) && ((0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { title: "Top up via internal transfer", description: "Receive crypto from other Ting users", icon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 24, height: 24 }, children: SvgPath_1.IC_RECEIVE_INTERNAL }), onClick: function () { return handleSelectMethod(ReceiveMethods.RECEIVE_INTERNAL); }, recommended: true })), functionsList.includes(ReceiveMethods.RECEIVE_EXTERNAL) && ((0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { title: "Top up via blockchain", description: "Deposit using a Web3 or an Exchange wallet", icon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 24, height: 24 }, children: SvgPath_1.IC_RECEIVE_EXTERNAL }), onClick: function () { return handleSelectMethod(ReceiveMethods.RECEIVE_EXTERNAL); }, recommended: true })), functionsList.includes(ReceiveMethods.RECEIVE_FIAT) && ((0, jsx_runtime_1.jsx)(FiatDeposit_1.default, { children: (0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { title: "Fiat-Gateway", description: "Experimental deposit via bank transfer", icon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 24, height: 24 }, children: SvgPath_1.IC_RECEIVE_EXTERNAL }), recommended: false, onClick: function () { return handleSelectMethod(ReceiveMethods.RECEIVE_FIAT); } }) }))] }), children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: {
|
|
435
435
|
position: "relative",
|
|
@@ -519,8 +519,10 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
519
519
|
}, children: [(0, jsx_runtime_1.jsx)("div", { id: "share-receive-info", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ width: "100%" }, theme.mixins.column), { gap: theme.mixins.gaps.g12, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.mixins.customRadius.r16, padding: theme.mixins.customPadding.p16, paddingTop: "5rem", alignItems: "flex-start", position: "relative", marginTop: "4.6875rem" }), children: [(0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
|
|
520
520
|
color: theme.palette.border.accent,
|
|
521
521
|
width: "100%",
|
|
522
|
-
} }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.center), { top: 0, width: "fit-content", height: "fit-content", borderRadius: theme.mixins.customRadius.r12, padding: theme.mixins.customPadding.p8 }), children: [(0, jsx_runtime_1.jsx)(QRCode_1.default, { value: qrCodeValue, logo: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.link, bgColor: "transparent", size: 150 }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.center), { padding: theme.mixins.customPadding.p4, borderRadius: 9999, backgroundColor: theme.palette.background.white }), children: (0, jsx_runtime_1.jsx)(Icon_1.default, { crossOrigin: "anonymous",
|
|
522
|
+
} }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.center), { top: 0, width: "fit-content", height: "fit-content", borderRadius: theme.mixins.customRadius.r12, padding: theme.mixins.customPadding.p8 }), children: [(0, jsx_runtime_1.jsx)(QRCode_1.default, { value: qrCodeValue, logo: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.link, bgColor: "transparent", size: 150 }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.center), { padding: theme.mixins.customPadding.p4, borderRadius: 9999, backgroundColor: theme.palette.background.white }), children: (0, jsx_runtime_1.jsx)(Icon_1.default, { crossOrigin: "anonymous", src: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.link, sx: {
|
|
523
523
|
borderRadius: 9999,
|
|
524
|
+
width: 24,
|
|
525
|
+
height: 24,
|
|
524
526
|
} }) })] }), isExternal && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Network" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.row), onClick: handleBack, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { component: "button", sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4, cursor: "pointer", transition: "transform 0.3s ease-in-out", "&:active": {
|
|
525
527
|
transform: "translateX(0.5rem)",
|
|
526
528
|
} }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 24, height: 24, sx: {
|
|
@@ -545,7 +547,7 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
545
547
|
width: "100%",
|
|
546
548
|
display: "flex",
|
|
547
549
|
justifyContent: "center",
|
|
548
|
-
}, onOpen: handleAmountModalOpen,
|
|
550
|
+
}, onOpen: handleAmountModalOpen, onDone: onCloseAmountModal, trigger: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { htmlFor: keyboardId, children: (0, jsx_runtime_1.jsxs)(Button_1.default.Text, { sx: {
|
|
549
551
|
fontSize: theme.typography.fontSize14,
|
|
550
552
|
textTransform: "none",
|
|
551
553
|
fontWeight: theme.typography.fontWeight500,
|
|
@@ -411,7 +411,7 @@ var ReceiveHistory = function (props) {
|
|
|
411
411
|
drawerRefs.current.detail = ref !== null && ref !== void 0 ? ref : undefined;
|
|
412
412
|
}, sx: {
|
|
413
413
|
width: "100%",
|
|
414
|
-
}, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT,
|
|
414
|
+
}, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, onDone: handleOnClose, children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
|
|
415
415
|
padding: 0,
|
|
416
416
|
width: "100dvw",
|
|
417
417
|
}, children: selectedItem && ((0, jsx_runtime_1.jsx)(ReceiveHistoryDetails_1.default, { onClose: handleCloseDetailDrawer, receiveData: {
|
|
@@ -231,13 +231,13 @@ exports.SwapFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
231
231
|
openHistory();
|
|
232
232
|
}
|
|
233
233
|
}, [isSwapPage, isHistoryPage, isHistoryDetailPage]);
|
|
234
|
-
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { className: className, sx: sx, ref: drawerRef, trigger: props.children, onOpen: handleOnOpenSwap,
|
|
234
|
+
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { className: className, sx: sx, ref: drawerRef, trigger: props.children, onOpen: handleOnOpenSwap, onDone: handleOnCloseSwap, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: SWAP_STEP_NAME[currentStep], overrideBack: handleBack, children: currentStep === SwapStep.SELECT_SWAP && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 18, height: 18 }, children: SvgPath_1.IC_HELP }), (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", sx: {
|
|
235
235
|
height: "1rem",
|
|
236
236
|
width: "1px",
|
|
237
237
|
backgroundColor: theme.palette.border.accent3,
|
|
238
238
|
marginLeft: theme.mixins.customMargin.m4,
|
|
239
239
|
marginRight: theme.mixins.customMargin.m4,
|
|
240
|
-
} }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: historyRef, trigger: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 18, height: 18 }, children: SvgPath_1.IC_HISTORY }), direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, onOpen: handleOnOpenHistory,
|
|
240
|
+
} }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: historyRef, trigger: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 18, height: 18 }, children: SvgPath_1.IC_HISTORY }), direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, onOpen: handleOnOpenHistory, onDone: handleOnCloseHistory, children: (0, jsx_runtime_1.jsx)(HistorySwap_1.default, { onClose: closeHistory }) })] })) }) }), footer: currentStep === SwapStep.SELECT_SWAP && ((0, jsx_runtime_1.jsx)(BottomActionLayout_1.default, { children: (0, jsx_runtime_1.jsx)(SwapToken_1.default
|
|
241
241
|
// onResetNumber={resetNumber}
|
|
242
242
|
, {
|
|
243
243
|
// onResetNumber={resetNumber}
|
package/dist/components/TekWallet/components/ui/WithdrawFunction/components/summary/infoSummary.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
14
|
if (k2 === undefined) k2 = k;
|
|
4
15
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -46,28 +57,27 @@ var SvgPath_1 = require("../../../SvgPath");
|
|
|
46
57
|
var Fees_1 = __importStar(require("../../../Fees"));
|
|
47
58
|
var safeText_1 = require("../../../../../utils/safeText");
|
|
48
59
|
var formatDate_1 = require("../../../../../utils/formatDate");
|
|
60
|
+
var providers_1 = require("../../../../../providers");
|
|
49
61
|
function TransferInfo(props) {
|
|
50
62
|
var type = props.type, message = props.message, datetime = props.datetime, recipientAddress = props.recipientAddress, amount = props.amount, estimateFee = props.estimateFee, estimateReceive = props.estimateReceive, selectedToken = props.selectedToken;
|
|
63
|
+
var theme = (0, providers_1.useTheme)();
|
|
51
64
|
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
52
65
|
display: "flex",
|
|
53
66
|
flexDirection: "column",
|
|
54
67
|
gap: 3,
|
|
55
|
-
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
56
|
-
fontSize: 16,
|
|
57
|
-
fontWeight: 600,
|
|
58
|
-
}, children: "Transaction summary" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
68
|
+
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.headerTitle), { textAlign: "start", mr: "auto" }), children: "Transaction summary" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
59
69
|
display: "flex",
|
|
60
70
|
flexDirection: "column",
|
|
61
71
|
gap: 3,
|
|
62
72
|
}, children: [(0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Amount", titleStyle: {
|
|
63
|
-
fontSize: "0.
|
|
73
|
+
fontSize: "0.875rem",
|
|
64
74
|
fontWeight: 500,
|
|
65
75
|
color: "gray.700",
|
|
66
76
|
}, value: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
|
|
67
77
|
fontSize: "0.875rem",
|
|
68
78
|
fontWeight: 500,
|
|
69
79
|
}, children: [amount, " ", selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug.toUpperCase()] }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Address", titleStyle: {
|
|
70
|
-
fontSize: "0.
|
|
80
|
+
fontSize: "0.875rem",
|
|
71
81
|
fontWeight: 500,
|
|
72
82
|
color: "gray.700",
|
|
73
83
|
}, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex flex-row gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
@@ -77,21 +87,21 @@ function TransferInfo(props) {
|
|
|
77
87
|
width: 16,
|
|
78
88
|
height: 16,
|
|
79
89
|
}, children: SvgPath_1.IC_COPY })] }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Type", titleStyle: {
|
|
80
|
-
fontSize: "0.
|
|
90
|
+
fontSize: "0.875rem",
|
|
81
91
|
fontWeight: 500,
|
|
82
92
|
color: "gray.700",
|
|
83
93
|
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
84
94
|
fontSize: "0.875rem",
|
|
85
95
|
fontWeight: 500,
|
|
86
96
|
}, children: type }), isAligned: true }), message && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Message", titleStyle: {
|
|
87
|
-
fontSize: "0.
|
|
97
|
+
fontSize: "0.875rem",
|
|
88
98
|
fontWeight: 500,
|
|
89
99
|
color: "gray.700",
|
|
90
100
|
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
91
101
|
fontSize: "0.875rem",
|
|
92
102
|
fontWeight: 500,
|
|
93
103
|
}, children: message }), isAligned: true })), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Datetime", titleStyle: {
|
|
94
|
-
fontSize: "0.
|
|
104
|
+
fontSize: "0.875rem",
|
|
95
105
|
fontWeight: 500,
|
|
96
106
|
color: "gray.700",
|
|
97
107
|
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
@@ -535,7 +535,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
535
535
|
(0, react_1.useEffect)(function () {
|
|
536
536
|
getEstimateFee();
|
|
537
537
|
}, [getEstimateFee]);
|
|
538
|
-
return ((0, jsx_runtime_1.jsx)(RequireConnect_1.default, { children: (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: props.onOpen,
|
|
538
|
+
return ((0, jsx_runtime_1.jsx)(RequireConnect_1.default, { children: (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: props.onOpen, onDone: handleOnClose, children: (0, jsx_runtime_1.jsxs)(ModalLayout_1.default, { overrideHeader: (0, jsx_runtime_1.jsx)(BackHeader_1.default, { sx: {
|
|
539
539
|
width: "100%",
|
|
540
540
|
display: "flex",
|
|
541
541
|
alignItems: "center",
|
|
@@ -11,39 +11,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
return __assign.apply(this, arguments);
|
|
13
13
|
};
|
|
14
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
-
}
|
|
20
|
-
Object.defineProperty(o, k2, desc);
|
|
21
|
-
}) : (function(o, m, k, k2) {
|
|
22
|
-
if (k2 === undefined) k2 = k;
|
|
23
|
-
o[k2] = m[k];
|
|
24
|
-
}));
|
|
25
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
-
}) : function(o, v) {
|
|
28
|
-
o["default"] = v;
|
|
29
|
-
});
|
|
30
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
-
var ownKeys = function(o) {
|
|
32
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
-
var ar = [];
|
|
34
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
return ownKeys(o);
|
|
38
|
-
};
|
|
39
|
-
return function (mod) {
|
|
40
|
-
if (mod && mod.__esModule) return mod;
|
|
41
|
-
var result = {};
|
|
42
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
-
__setModuleDefault(result, mod);
|
|
44
|
-
return result;
|
|
45
|
-
};
|
|
46
|
-
})();
|
|
47
14
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
48
15
|
var t = {};
|
|
49
16
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -71,7 +38,7 @@ var ThemeProvider_1 = require("../../../providers/ThemeProvider");
|
|
|
71
38
|
var AmountGroupAndChart_1 = __importDefault(require("../../ui/AmountGroupAndChart"));
|
|
72
39
|
var link_1 = __importDefault(require("next/link"));
|
|
73
40
|
var TekWalletProvider_1 = require("../../../providers/TekWalletProvider");
|
|
74
|
-
var ReceiveFunction_1 =
|
|
41
|
+
var ReceiveFunction_1 = __importDefault(require("../../ui/ReceiveFunction"));
|
|
75
42
|
var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
|
|
76
43
|
var Menu_1 = __importDefault(require("./Menu"));
|
|
77
44
|
var ActivitiesTypeSlice_1 = __importDefault(require("../../ui/ActivitiesTypeSlice"));
|
|
@@ -95,7 +62,7 @@ var AssetView = function (props) {
|
|
|
95
62
|
router.back();
|
|
96
63
|
};
|
|
97
64
|
return ((0, jsx_runtime_1.jsxs)(ChildPageLayout_1.default, { header: !!isInitPasscode && (0, jsx_runtime_1.jsx)(AssetViewHeader_1.default, {}), children: [!isInitPasscode && !!masterWallet && ((0, jsx_runtime_1.jsx)(ChangePasscodeView_1.default, { isInitPasscode: true, onBack: handleBackInitPasscodeView, idPrefix: idPrefix })), !!isInitPasscode && ((0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, __assign({}, rest, { sx: __assign({ display: "flex", flexDirection: "column", gap: theme.mixins.gaps.g16 }, sx), children: [useBasicAmountGroupInAssetView ? (0, jsx_runtime_1.jsx)(BasicAmountGroup_1.default, {}) : (0, jsx_runtime_1.jsx)(AmountGroupAndChart_1.default, {}), (0, jsx_runtime_1.jsx)(Menu_1.default, { items: [
|
|
98
|
-
(0, jsx_runtime_1.jsx)(ReceiveFunction_1.default, {
|
|
65
|
+
(0, jsx_runtime_1.jsx)(ReceiveFunction_1.default, { children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { sx: {
|
|
99
66
|
borderRight: "1px solid ".concat(theme.palette.border.accent3),
|
|
100
67
|
placeContent: "center",
|
|
101
68
|
columnSpan: 1,
|
|
@@ -103,7 +103,6 @@ var init_passcode_service_1 = __importDefault(require("../../../services/axios/i
|
|
|
103
103
|
var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
|
|
104
104
|
var xhub_keyboard_1 = require("xhub-keyboard");
|
|
105
105
|
var useWarningWrongPasscode_1 = require("../../../hooks/useWarningWrongPasscode");
|
|
106
|
-
var clsx_1 = __importDefault(require("clsx"));
|
|
107
106
|
var passcodeLength = 6;
|
|
108
107
|
var ChangePasscodeView = function (props) {
|
|
109
108
|
var _a = props.isInitPasscode, isInitPasscode = _a === void 0 ? false : _a, _b = props.idPrefix, idPrefix = _b === void 0 ? "" : _b;
|
|
@@ -313,10 +312,13 @@ var ChangePasscodeView = function (props) {
|
|
|
313
312
|
};
|
|
314
313
|
var _j = getValueAndHandlerByStep(currentStep), value = _j.value, onChange = _j.onChange;
|
|
315
314
|
var keyboardId = (0, react_2.useMemo)(function () { return "".concat(idPrefix, "-").concat(isInitPasscode ? "init" : "change", "-passcode-keyboard"); }, [isInitPasscode, idPrefix]);
|
|
316
|
-
return ((0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { id: keyboardId, keyboardType: xhub_keyboard_1.KeyboardType.Text, layoutType: xhub_keyboard_1.LayoutType.Integer, value: value, onChange: onChange, viewFullHeight: true,
|
|
317
|
-
|
|
318
|
-
"
|
|
319
|
-
}
|
|
315
|
+
return ((0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { id: keyboardId, keyboardType: xhub_keyboard_1.KeyboardType.Text, layoutType: xhub_keyboard_1.LayoutType.Integer, value: value, onChange: onChange, viewFullHeight: true, styles: {
|
|
316
|
+
container: {
|
|
317
|
+
height: "100%",
|
|
318
|
+
},
|
|
319
|
+
keyboardContainer: {
|
|
320
|
+
display: isLocked ? "none" : "block",
|
|
321
|
+
},
|
|
320
322
|
}, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { ref: childPageLayoutRef, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { overrideBack: handleBack, title: pageTitle, renderBack: function (Back) { return ((0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { useBrowserInput: false, htmlFor: keyboardId, children: Back })); } }), children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: __assign({ display: "flex", flexDirection: "column", gap: "1rem", height: "100%" }, props.sx), children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperControlledRef, disableSwipe: true, initialActiveTab: currentStep, sx: { height: "100%" }, swiperStyle: {
|
|
321
323
|
flex: 1,
|
|
322
324
|
}, children: [(0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
15
|
+
var material_1 = require("@mui/material");
|
|
16
|
+
var ThemeProvider_1 = require("../../../providers/ThemeProvider");
|
|
17
|
+
function LoadingView() {
|
|
18
|
+
var theme = (0, ThemeProvider_1.useTheme)();
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", gap: 2, flexDirection: "column", alignItems: "center", sx: { width: "100%" }, children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "circular", width: 64, height: 64 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", sx: {
|
|
20
|
+
transform: "scale(1)",
|
|
21
|
+
}, width: "40%", height: 42 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", sx: {
|
|
22
|
+
transform: "scale(1)",
|
|
23
|
+
}, width: "60%", height: 18 })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", sx: {
|
|
24
|
+
transform: "scale(1)",
|
|
25
|
+
}, width: "40%", height: 20 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", sx: {
|
|
26
|
+
transform: "scale(1)",
|
|
27
|
+
}, width: "100%", height: 40 })] })] }));
|
|
28
|
+
}
|
|
29
|
+
exports.default = LoadingView;
|