tek-wallet 0.0.825 → 0.0.827

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.
Files changed (26) hide show
  1. package/dist/components/TekWallet/components/layouts/FullHeightAndScroll/index.d.ts +4 -0
  2. package/dist/components/TekWallet/components/layouts/FullHeightAndScroll/index.js +9 -0
  3. package/dist/components/TekWallet/components/ui/BottomActionLayout/index.js +3 -1
  4. package/dist/components/TekWallet/components/ui/FiatDeposit/index.js +1 -5
  5. package/dist/components/TekWallet/components/views/AssetView/index.js +2 -9
  6. package/dist/components/TekWallet/components/views/ChangePasscodeView/index.d.ts +1 -0
  7. package/dist/components/TekWallet/components/views/ChangePasscodeView/index.js +22 -10
  8. package/dist/components/TekWallet/components/views/InitPasscodeView.d.ts +2 -0
  9. package/dist/components/TekWallet/components/views/InitPasscodeView.js +18 -0
  10. package/dist/components/TekWallet/components/views/SendExternalView/components/Form.js +2 -2
  11. package/dist/components/TekWallet/components/views/SendExternalView/index.js +4 -1
  12. package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +2 -2
  13. package/dist/components/TekWallet/components/views/SendInternalView/index.js +3 -2
  14. package/dist/components/TekWallet/components/views/SendNftView/components/Form.js +18 -20
  15. package/dist/components/TekWallet/components/views/SwapView/index.js +3 -2
  16. package/dist/components/TekWallet/components/views/TekWalletView/index.d.ts +2 -1
  17. package/dist/components/TekWallet/components/views/TekWalletView/index.js +5 -0
  18. package/package.json +1 -1
  19. package/dist/components/TekWallet/components/ui/ModalSelectToken/index.d.ts +0 -9
  20. package/dist/components/TekWallet/components/ui/ModalSelectToken/index.js +0 -127
  21. package/dist/components/TekWallet/components/ui/ReceiveHistory/ReceiveCardHistory.d.ts +0 -11
  22. package/dist/components/TekWallet/components/ui/ReceiveHistory/ReceiveCardHistory.js +0 -77
  23. package/dist/components/TekWallet/components/ui/ReceiveHistory/ReceiveHistoryDetails.d.ts +0 -8
  24. package/dist/components/TekWallet/components/ui/ReceiveHistory/ReceiveHistoryDetails.js +0 -115
  25. package/dist/components/TekWallet/components/ui/ReceiveHistory/index.d.ts +0 -9
  26. package/dist/components/TekWallet/components/ui/ReceiveHistory/index.js +0 -447
@@ -1,77 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var jsx_runtime_1 = require("react/jsx-runtime");
7
- var mui_1 = require("../../../theme/mui");
8
- var Text_1 = __importDefault(require("../Text"));
9
- var Column_1 = __importDefault(require("../Column"));
10
- var Row_1 = __importDefault(require("../Row"));
11
- var InlineTitleValue_1 = __importDefault(require("../InlineTitleValue"));
12
- var CopyTextComponent_1 = __importDefault(require("../CopyTextComponent"));
13
- var safeText_1 = require("../../../utils/safeText");
14
- var number_extension_1 = require("../../../utils/number.extension");
15
- var material_1 = require("@mui/material");
16
- var SvgPath_1 = require("../SvgPath");
17
- var formatDate_1 = require("../../../utils/formatDate");
18
- var ReceiveCardHistory = function (_a) {
19
- var toAddress = _a.toAddress, date = _a.date, amount = _a.amount, currencySlug = _a.currencySlug, network = _a.network, status = _a.status;
20
- var theme = (0, mui_1.useTheme)();
21
- var getStatusColor = function (status) {
22
- switch (status) {
23
- case "success":
24
- return theme.palette.success.main;
25
- case "failed":
26
- return theme.palette.error.main;
27
- case "processing":
28
- return theme.palette.warning.main;
29
- default:
30
- return theme.palette.text.secondary;
31
- }
32
- };
33
- return ((0, jsx_runtime_1.jsxs)(Column_1.default, { sx: {
34
- gap: theme.styleMixins.gaps.g2,
35
- }, children: [(0, jsx_runtime_1.jsx)(Row_1.default, { sx: { justifyContent: "space-between" }, children: (0, jsx_runtime_1.jsxs)(Column_1.default, { sx: { gap: theme.styleMixins.gaps.g1 }, children: [(0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
36
- fontWeight: 700,
37
- fontSize: "1rem",
38
- }, children: [(0, number_extension_1.formatCurrencyNumber)(Number(amount !== null && amount !== void 0 ? amount : 0)), " ", currencySlug === null || currencySlug === void 0 ? void 0 : currencySlug.toUpperCase()] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
39
- backgroundColor: getStatusColor(status !== null && status !== void 0 ? status : ""),
40
- borderRadius: theme.styleMixins.customRadius.r8,
41
- padding: theme.styleMixins.customPadding.p4,
42
- width: "fit-content",
43
- display: "flex",
44
- alignItems: "center",
45
- justifyContent: "center",
46
- }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: { fontWeight: 500, fontSize: "0.625rem" }, children: (0, safeText_1.firstLetterToUpperCase)(status !== null && status !== void 0 ? status : "unknown") }) })] }) }), (0, jsx_runtime_1.jsxs)(Column_1.default, { sx: { gap: theme.styleMixins.gaps.g2, paddingTop: theme.styleMixins.customPadding.p4 }, children: [(0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "To address:", titleStyle: {
47
- fontWeight: 500,
48
- fontSize: "0.813rem",
49
- color: theme.palette.text.secondary,
50
- }, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: (0, safeText_1.safeText)(toAddress !== null && toAddress !== void 0 ? toAddress : "", {
51
- isShort: true,
52
- }), children: (0, jsx_runtime_1.jsxs)(Row_1.default, { sx: {
53
- gap: theme.styleMixins.gaps.g1,
54
- justifyContent: "space-between",
55
- width: "100%",
56
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
57
- whiteSpace: "nowrap",
58
- fontWeight: 500,
59
- fontSize: "0.813rem",
60
- }, children: (0, safeText_1.safeText)(toAddress !== null && toAddress !== void 0 ? toAddress : "", {
61
- isShort: true,
62
- }) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16 }, children: SvgPath_1.IC_COPY })] }) }) }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Network:", titleStyle: {
63
- color: theme.palette.text.secondary,
64
- fontWeight: 500,
65
- fontSize: "0.813rem",
66
- }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
67
- color: theme.palette.text.secondary,
68
- whiteSpace: "nowrap",
69
- fontWeight: 500,
70
- fontSize: "0.813rem",
71
- }, children: network === null || network === void 0 ? void 0 : network.toUpperCase() }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
72
- color: theme.palette.text.secondary,
73
- fontWeight: 500,
74
- fontSize: "0.813rem",
75
- }, children: (0, formatDate_1.customFormatDate)(date !== null && date !== void 0 ? date : "", { format: formatDate_1.DateFormat.MMM_DD_YYYY_HH_MM_SS }) })] })] }));
76
- };
77
- exports.default = ReceiveCardHistory;
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- import { SwapResponse } from "../../../services/axios/swap-service/type";
3
- interface ReceiveHistoryDetailsProps {
4
- onClose?: () => void;
5
- receiveData?: SwapResponse;
6
- }
7
- declare const ReceiveHistoryDetails: React.FC<ReceiveHistoryDetailsProps>;
8
- export default ReceiveHistoryDetails;
@@ -1,115 +0,0 @@
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
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- var jsx_runtime_1 = require("react/jsx-runtime");
18
- var react_1 = require("react");
19
- var useWallet_1 = __importDefault(require("../../../hooks/useWallet"));
20
- var mui_1 = require("../../../theme/mui");
21
- var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
22
- var Button_1 = __importDefault(require("../Button"));
23
- var Text_1 = __importDefault(require("../Text"));
24
- var material_1 = require("@mui/material");
25
- var Icon_1 = __importDefault(require("../Icon"));
26
- var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
27
- var LineValue_1 = __importDefault(require("../LineValue"));
28
- var formatDate_1 = __importDefault(require("../../../utils/formatDate"));
29
- var roundToTwoSignificantDecimals_1 = __importDefault(require("../../../utils/roundToTwoSignificantDecimals"));
30
- var ReceiveHistoryDetails = function (_a) {
31
- var _b, _c, _d;
32
- var onClose = _a.onClose, swapData = _a.receiveData;
33
- var transaction = (0, useWallet_1.default)().transaction;
34
- var theme = (0, mui_1.useTheme)();
35
- var resultData = transaction || (swapData === null || swapData === void 0 ? void 0 : swapData.data);
36
- var feeInfo = (0, react_1.useMemo)(function () {
37
- var _a, _b;
38
- return ((_b = (_a = resultData === null || resultData === void 0 ? void 0 : resultData.fee_info) === null || _a === void 0 ? void 0 : _a.fee_detail) === null || _b === void 0 ? void 0 : _b.map(function (item) { return item === null || item === void 0 ? void 0 : item.currency; })) || [];
39
- }, [resultData]);
40
- var getOutputs = feeInfo === null || feeInfo === void 0 ? void 0 : feeInfo.map(function (item) { return item === null || item === void 0 ? void 0 : item.outputs; });
41
- var getDetailOutputs = ((_b = getOutputs === null || getOutputs === void 0 ? void 0 : getOutputs[0]) === null || _b === void 0 ? void 0 : _b.map(function (item) { return item; })) || [];
42
- var getInfoDetailOutputs = (0, react_1.useMemo)(function () {
43
- return (getDetailOutputs === null || getDetailOutputs === void 0 ? void 0 : getDetailOutputs[0]) || {};
44
- }, [getDetailOutputs]);
45
- return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: __assign({ color: theme.palette.text.primary, width: "100%" }, theme.styleMixins.pagePadding), footer: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
46
- px: theme.styleMixins.customPadding.p12,
47
- position: "relative",
48
- bottom: theme.typography.fontSize24,
49
- }, children: (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "processing" ||
50
- (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "failed" ? ((0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: onClose, sx: __assign(__assign({ gap: theme.styleMixins.gaps.g4 }, theme.styleMixins.row), { color: theme.palette.text.secondary, borderRadius: theme.styleMixins.customRadius.r12, height: "40px" }), fullWidth: true, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
51
- fontSize: theme.typography.fontSize12,
52
- fontWeight: theme.typography.fontWeight600,
53
- leading: theme.typography.leading160,
54
- textTransform: "none",
55
- color: theme.palette.secondary.main,
56
- }, children: "Close" }) })) : ((resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "success" && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8, justifyContent: "center" }), children: [(0, jsx_runtime_1.jsx)(Button_1.default.Secondary, { onClick: onClose, sx: __assign(__assign({ gap: theme.styleMixins.gaps.g4 }, theme.styleMixins.row), { borderRadius: theme.styleMixins.customRadius.r12, borderColor: theme.palette.primary.main, backgroundColor: "transparent", maxWidth: "100%", height: "40px" }), fullWidth: true, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
57
- fontSize: theme.typography.fontSize13,
58
- fontWeight: theme.typography.fontWeight600,
59
- color: theme.palette.primary.main,
60
- leading: theme.typography.leading160,
61
- textTransform: "none",
62
- }, children: "Close" }) }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: onClose, sx: __assign(__assign({ gap: theme.styleMixins.gaps.g4 }, theme.styleMixins.row), { color: theme.palette.text.secondary, borderRadius: theme.styleMixins.customRadius.r12, maxWidth: "100%", height: "40px" }), fullWidth: true, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
63
- fontSize: theme.typography.fontSize13,
64
- fontWeight: theme.typography.fontWeight600,
65
- leading: theme.typography.leading160,
66
- textTransform: "none",
67
- color: theme.palette.secondary.main,
68
- }, children: "View asset" }) })] }))) }), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ width: "100%" }, theme.styleMixins.column), { top: 0, transform: "translateY(30%)", gap: theme.styleMixins.gaps.g12, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.styleMixins.customRadius.r16, padding: theme.styleMixins.customPadding.p16, paddingTop: "80px", alignItems: "flex-start", position: "relative", marginTop: "75px" }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.center), { top: 0, width: "fit-content", height: "fit-content", borderRadius: theme.styleMixins.customRadius.r12, padding: theme.styleMixins.customPadding.p8 }), children: (0, jsx_runtime_1.jsx)(Icon_1.default, { width: 100, height: 100, src: (0, getIcon_1.default)((resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "success"
69
- ? "success"
70
- : (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "failed"
71
- ? "failed"
72
- : (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "processing"
73
- ? "processing"
74
- : "") }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { mt: theme.styleMixins.customMargin.m8, textAlign: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
75
- color: theme.palette.text.secondary,
76
- fontSize: theme.typography.fontSize14,
77
- fontWeight: theme.typography.fontWeight400,
78
- }, children: "Swapping Token" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
79
- fontSize: theme.typography.fontSize24,
80
- fontWeight: theme.typography.fontWeight600,
81
- textTransform: "capitalize",
82
- }, children: resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
83
- width: "100%",
84
- color: theme.palette.text.secondary,
85
- mt: theme.styleMixins.customMargin.m12,
86
- } }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { justifyContent: "space-between", mt: theme.styleMixins.customMargin.m16 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: (_c = resultData === null || resultData === void 0 ? void 0 : resultData.currency_data) === null || _c === void 0 ? void 0 : _c.link, width: 20, height: 20, className: "rounded-full" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
87
- fontSize: theme.typography.fontSize14,
88
- fontWeight: theme.typography.fontWeight700,
89
- }, children: resultData === null || resultData === void 0 ? void 0 : resultData.amount })] }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("swap_horizontal"), width: 20, height: 20 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: getInfoDetailOutputs === null || getInfoDetailOutputs === void 0 ? void 0 : getInfoDetailOutputs.link, width: 20, height: 20, className: "rounded-full" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
90
- fontSize: theme.typography.fontSize14,
91
- fontWeight: theme.typography.fontWeight700,
92
- }, children: (0, roundToTwoSignificantDecimals_1.default)((resultData === null || resultData === void 0 ? void 0 : resultData.amount) * (getInfoDetailOutputs === null || getInfoDetailOutputs === void 0 ? void 0 : getInfoDetailOutputs.swap_amount)) })] })] }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
93
- width: "100%",
94
- color: theme.palette.text.secondary,
95
- mt: theme.styleMixins.customMargin.m12,
96
- } }), (0, jsx_runtime_1.jsx)(LineValue_1.default, { sx: {
97
- mt: theme.styleMixins.customMargin.m16,
98
- mb: theme.styleMixins.customMargin.m16,
99
- }, field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
100
- fontSize: theme.typography.fontSize12,
101
- color: theme.palette.text.primary,
102
- }, children: "Price" }), value: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
103
- fontSize: theme.typography.fontSize14,
104
- fontWeight: theme.typography.fontWeight700,
105
- ml: theme.styleMixins.customMargin.m8,
106
- }, children: ["1 ", (_d = resultData === null || resultData === void 0 ? void 0 : resultData.currency_data) === null || _d === void 0 ? void 0 : _d.full_name, " ~ ", getInfoDetailOutputs === null || getInfoDetailOutputs === void 0 ? void 0 : getInfoDetailOutputs.swap_amount, " ", getInfoDetailOutputs === null || getInfoDetailOutputs === void 0 ? void 0 : getInfoDetailOutputs.full_name] }) }), (0, jsx_runtime_1.jsx)(LineValue_1.default, { field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
107
- fontSize: theme.typography.fontSize12,
108
- color: theme.palette.text.primary,
109
- }, children: "Date time" }), value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
110
- fontSize: theme.typography.fontSize14,
111
- fontWeight: theme.typography.fontWeight700,
112
- ml: theme.styleMixins.customMargin.m8,
113
- }, children: (0, formatDate_1.default)(resultData === null || resultData === void 0 ? void 0 : resultData.date_created) }) })] })] }) }));
114
- };
115
- exports.default = ReceiveHistoryDetails;
@@ -1,9 +0,0 @@
1
- interface ReceiveHistoryProps {
2
- onClose?: () => void;
3
- open?: boolean;
4
- }
5
- export interface ReceiveHistoryRef {
6
- resetStatus: () => void;
7
- }
8
- declare const ReceiveHistory: (props: ReceiveHistoryProps) => import("react/jsx-runtime").JSX.Element;
9
- export default ReceiveHistory;