tek-wallet 0.0.695 → 0.0.697
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/QrCodeReader/index.js +25 -9
- package/dist/components/TekWallet/components/ui/ScanQRToSend/index.js +2 -7
- package/dist/components/TekWallet/components/ui/TransferConfirmation/index.d.ts +5 -5
- package/dist/components/TekWallet/components/ui/TransferConfirmation/index.js +8 -8
- package/dist/components/TekWallet/theme/mui/theme.js +1 -1
- package/package.json +1 -1
|
@@ -18,6 +18,7 @@ var STYLES = {
|
|
|
18
18
|
nodeSize: "10%",
|
|
19
19
|
};
|
|
20
20
|
var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
|
|
21
|
+
var sx = props.sx, className = props.className;
|
|
21
22
|
var qrReaderContainer = (0, react_1.useRef)(null);
|
|
22
23
|
var drawerRef = (0, react_1.useRef)(null);
|
|
23
24
|
var _a = (0, react_1.useState)(false), isOpen = _a[0], setIsOpen = _a[1];
|
|
@@ -76,15 +77,30 @@ var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
76
77
|
};
|
|
77
78
|
}
|
|
78
79
|
}, [isOpen]);
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
// useLayoutEffect(() => {
|
|
81
|
+
// const styleTag = document.createElement("style");
|
|
82
|
+
// styleTag.innerHTML = `
|
|
83
|
+
// @keyframes move-up-down {
|
|
84
|
+
// 0% {
|
|
85
|
+
// top: 0%;
|
|
86
|
+
// }
|
|
87
|
+
// 50% {
|
|
88
|
+
// top: 100%;
|
|
89
|
+
// }
|
|
90
|
+
// 100% {
|
|
91
|
+
// top: 0%;
|
|
92
|
+
// }
|
|
93
|
+
// }
|
|
94
|
+
// .move-up-down-animation {
|
|
95
|
+
// animation: move-up-down 5s infinite linear;
|
|
96
|
+
// }
|
|
97
|
+
// `;
|
|
98
|
+
// document.head.appendChild(styleTag);
|
|
99
|
+
// return () => {
|
|
100
|
+
// styleTag.remove();
|
|
101
|
+
// };
|
|
102
|
+
// }, []);
|
|
103
|
+
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { trigger: props.children, ref: drawerRef, onClose: onClose, onOpen: onOpen, sx: sx, className: className, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: {
|
|
88
104
|
backgroundColor: "transparent !important",
|
|
89
105
|
}, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { hideBack: true, title: "Scan QR code", sx: {
|
|
90
106
|
position: "absolute",
|
|
@@ -67,7 +67,7 @@ var type_1 = require("../../../services/axios/validate-wallet-address-service/ty
|
|
|
67
67
|
var navigation_1 = require("next/navigation");
|
|
68
68
|
var ThemeProvider_1 = require("../../../providers/ThemeProvider");
|
|
69
69
|
exports.ScanQRToSend = (0, react_1.forwardRef)(function (props, ref) {
|
|
70
|
-
var children = props.children, transferInternalPath = props.transferInternalPath, transferExternalPath = props.transferExternalPath, gotoTransferInternalOverride = props.gotoTransferInternalOverride, gotoTransferExternalOverride = props.gotoTransferExternalOverride,
|
|
70
|
+
var children = props.children, transferInternalPath = props.transferInternalPath, transferExternalPath = props.transferExternalPath, gotoTransferInternalOverride = props.gotoTransferInternalOverride, gotoTransferExternalOverride = props.gotoTransferExternalOverride, sx = props.sx, className = props.className;
|
|
71
71
|
var internalPath = transferInternalPath || "/transfer-internal";
|
|
72
72
|
var externalPath = transferExternalPath || "/transfer-external";
|
|
73
73
|
var drawerRef = (0, react_1.useRef)(null);
|
|
@@ -93,11 +93,6 @@ exports.ScanQRToSend = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
93
93
|
var handleClearInfoDialogContent = function () {
|
|
94
94
|
setInfoDialogContent(undefined);
|
|
95
95
|
};
|
|
96
|
-
//
|
|
97
|
-
var openCanner = function () {
|
|
98
|
-
var _a;
|
|
99
|
-
(_a = scannerAllQrCodeRef.current) === null || _a === void 0 ? void 0 : _a.open();
|
|
100
|
-
};
|
|
101
96
|
var gotoTransferInternal = function (params) {
|
|
102
97
|
var theParams = params !== null && params !== void 0 ? params : paramsData;
|
|
103
98
|
if (gotoTransferInternalOverride) {
|
|
@@ -177,7 +172,7 @@ exports.ScanQRToSend = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
177
172
|
}
|
|
178
173
|
});
|
|
179
174
|
}); };
|
|
180
|
-
return ((0, jsx_runtime_1.jsx)(RequireConnect_1.default, { sx: sx, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(
|
|
175
|
+
return ((0, jsx_runtime_1.jsx)(RequireConnect_1.default, { sx: sx, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(QrCodeReader_1.default, { ref: scannerAllQrCodeRef, onResult: handleScanAllQrCode, className: className, children: children }), (0, jsx_runtime_1.jsx)(AppBackDrop_1.default, { ref: loadingDropRef }), (0, jsx_runtime_1.jsx)(AppDialog_1.default, { overrideOpen: !!infoDialogContent, children: (0, jsx_runtime_1.jsx)(DialogContentLayout_1.default, { content: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
181
176
|
textAlign: "center",
|
|
182
177
|
display: "inline-block",
|
|
183
178
|
width: "100%",
|
|
@@ -17,11 +17,11 @@ export interface TransferConfirmationTokenRef {
|
|
|
17
17
|
close: () => void;
|
|
18
18
|
}
|
|
19
19
|
export declare enum TransferConfirmationError {
|
|
20
|
-
TOKEN_NOT_FOUND = "Token not found",
|
|
21
|
-
NOT_ENOUGH_BALANCE = "Not enough balance",
|
|
22
|
-
MAX_AMOUNT = "Max amount",
|
|
23
|
-
MIN_AMOUNT = "Min amount",
|
|
24
|
-
FAILED = "Failed"
|
|
20
|
+
TOKEN_NOT_FOUND = "\u24D8 Token not found",
|
|
21
|
+
NOT_ENOUGH_BALANCE = "\u24D8 Not enough balance",
|
|
22
|
+
MAX_AMOUNT = "\u24D8 Max amount",
|
|
23
|
+
MIN_AMOUNT = "\u24D8 Min amount",
|
|
24
|
+
FAILED = "\u24D8 Failed"
|
|
25
25
|
}
|
|
26
26
|
export declare const TransferConfirmation: import("react").ForwardRefExoticComponent<Omit<TransferConfirmationProps, "ref"> & import("react").RefAttributes<TransferConfirmationTokenRef>>;
|
|
27
27
|
export default TransferConfirmation;
|
|
@@ -97,22 +97,22 @@ var RequireConnect_1 = __importDefault(require("../RequireConnect"));
|
|
|
97
97
|
var useWalletData_1 = __importDefault(require("../../../hooks/useWalletData"));
|
|
98
98
|
var type_1 = require("../../../services/axios/get-activities-service/type");
|
|
99
99
|
var useWithdrawData_1 = __importDefault(require("../../../hooks/useWithdrawData"));
|
|
100
|
-
var material_1 = require("@mui/material");
|
|
101
100
|
var validate_wallet_address_service_1 = __importDefault(require("../../../services/axios/validate-wallet-address-service"));
|
|
102
101
|
var type_2 = require("../../../services/axios/validate-wallet-address-service/type");
|
|
103
102
|
var ConfirmByPasscode_1 = __importDefault(require("../ConfirmByPasscode"));
|
|
104
103
|
var instructions_service_1 = __importDefault(require("../../../services/axios/instructions-service"));
|
|
104
|
+
var providers_1 = require("../../../providers");
|
|
105
105
|
var TransferConfirmationError;
|
|
106
106
|
(function (TransferConfirmationError) {
|
|
107
|
-
TransferConfirmationError["TOKEN_NOT_FOUND"] = "Token not found";
|
|
108
|
-
TransferConfirmationError["NOT_ENOUGH_BALANCE"] = "Not enough balance";
|
|
109
|
-
TransferConfirmationError["MAX_AMOUNT"] = "Max amount";
|
|
110
|
-
TransferConfirmationError["MIN_AMOUNT"] = "Min amount";
|
|
111
|
-
TransferConfirmationError["FAILED"] = "Failed";
|
|
107
|
+
TransferConfirmationError["TOKEN_NOT_FOUND"] = "\u24D8 Token not found";
|
|
108
|
+
TransferConfirmationError["NOT_ENOUGH_BALANCE"] = "\u24D8 Not enough balance";
|
|
109
|
+
TransferConfirmationError["MAX_AMOUNT"] = "\u24D8 Max amount";
|
|
110
|
+
TransferConfirmationError["MIN_AMOUNT"] = "\u24D8 Min amount";
|
|
111
|
+
TransferConfirmationError["FAILED"] = "\u24D8 Failed";
|
|
112
112
|
})(TransferConfirmationError || (exports.TransferConfirmationError = TransferConfirmationError = {}));
|
|
113
113
|
exports.TransferConfirmation = (0, react_1.forwardRef)(function (props, ref) {
|
|
114
114
|
var _a, _b;
|
|
115
|
-
var theme = (0,
|
|
115
|
+
var theme = (0, providers_1.useTheme)();
|
|
116
116
|
var transferData = props.transferData, transferContent = props.transferContent;
|
|
117
117
|
var _c = (0, useWithdrawData_1.default)(), sendInternalTokens = _c.sendInternalTokens, updateSendInternalToken = _c.updateSendInternalToken;
|
|
118
118
|
var isInitPasscode = (0, useWalletData_1.default)().isInitPasscode;
|
|
@@ -200,7 +200,7 @@ exports.TransferConfirmation = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
200
200
|
(_b = props.onTransferSuccess) === null || _b === void 0 ? void 0 : _b.call(props, response);
|
|
201
201
|
}
|
|
202
202
|
else {
|
|
203
|
-
throw new Error("Send internal failed");
|
|
203
|
+
throw new Error("ⓘ Send internal failed");
|
|
204
204
|
}
|
|
205
205
|
return [3 /*break*/, 3];
|
|
206
206
|
case 2:
|
|
@@ -379,7 +379,7 @@ var theme = {
|
|
|
379
379
|
dialogActionsCancel: {
|
|
380
380
|
fontSize: typography.fontSize14,
|
|
381
381
|
lineHeight: typography.leading140,
|
|
382
|
-
color: text.
|
|
382
|
+
color: text.white64,
|
|
383
383
|
textAlign: "center",
|
|
384
384
|
padding: "".concat(customPadding.p8, " ").concat(customPadding.p16),
|
|
385
385
|
},
|