tek-wallet 0.0.761 → 0.0.763
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 +15 -24
- package/dist/components/TekWallet/components/ui/ActivityDetail/index.js +4 -2
- package/dist/components/TekWallet/components/ui/ActivityItem/index.js +3 -1
- package/dist/components/TekWallet/components/ui/AnalyticGroupCenter/index.js +10 -42
- package/dist/components/TekWallet/components/ui/AssetViewHeader/index.js +5 -4
- package/dist/components/TekWallet/components/ui/FiatDeposit/index.js +8 -2
- package/dist/components/TekWallet/components/views/AssetView/index.js +4 -4
- package/dist/components/TekWallet/components/views/DetailActivityView/index.d.ts +8 -0
- package/dist/components/TekWallet/components/views/DetailActivityView/index.js +31 -0
- package/dist/components/TekWallet/components/views/SendExternalView/components/Summary.js +1 -4
- package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.js +1 -1
- package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +1 -1
- package/dist/components/TekWallet/components/views/SendInternalView/components/Summary.js +1 -4
- package/dist/components/TekWallet/components/views/SettingView/index.d.ts +1 -1
- package/dist/components/TekWallet/components/views/SettingView/index.js +4 -4
- package/dist/components/TekWallet/components/views/TekWalletView/expose.d.ts +0 -1
- package/dist/components/TekWallet/components/views/TekWalletView/expose.js +0 -1
- package/dist/components/TekWallet/components/views/TekWalletView/index.d.ts +9 -0
- package/dist/components/TekWallet/components/views/TekWalletView/index.js +47 -3
- package/dist/components/TekWallet/providers/EventHandlerProvider/index.js +26 -2
- package/dist/components/TekWallet/providers/RealtimeProvider/index.js +33 -5
- package/dist/components/TekWallet/providers/RealtimeProvider/type.d.ts +1 -0
- package/dist/components/TekWallet/providers/WalletDataProvider/index.js +2 -0
- package/dist/components/TekWallet/providers/WalletDataProviderNoImport/index.js +2 -0
- package/dist/components/TekWallet/types/expose-type.d.ts +4 -0
- package/dist/components/TekWallet/utils/stopPropagation.d.ts +2 -0
- package/dist/components/TekWallet/utils/stopPropagation.js +7 -0
- package/package.json +1 -1
- package/dist/components/TekWallet/components/views/TekWalletView/routes.d.ts +0 -10
- package/dist/components/TekWallet/components/views/TekWalletView/routes.js +0 -45
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.Status = void 0;
|
|
18
18
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
19
|
var material_1 = require("@mui/material");
|
|
20
|
+
var link_1 = __importDefault(require("next/link"));
|
|
20
21
|
var ThemeProvider_1 = require("../../../providers/ThemeProvider");
|
|
21
22
|
var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
|
|
22
23
|
var EmptyData_1 = __importDefault(require("../EmptyData"));
|
|
@@ -24,10 +25,8 @@ var ActivityItem_1 = __importDefault(require("../ActivityItem"));
|
|
|
24
25
|
var useActivities_1 = __importDefault(require("../../../hooks/useActivities"));
|
|
25
26
|
var react_1 = require("react");
|
|
26
27
|
var WaitingData_1 = __importDefault(require("../WaitingData"));
|
|
27
|
-
var DrawerComponent_1 = __importDefault(require("../DrawerComponent"));
|
|
28
|
-
var ModalLayout_1 = __importDefault(require("../ModalLayout"));
|
|
29
|
-
var ActivityDetail_1 = __importDefault(require("../ActivityDetail"));
|
|
30
28
|
var SmartList_1 = __importDefault(require("../SmartList"));
|
|
29
|
+
var TekWalletProvider_1 = require("../../../providers/TekWalletProvider");
|
|
31
30
|
var Status;
|
|
32
31
|
(function (Status) {
|
|
33
32
|
Status["Loading"] = "loading";
|
|
@@ -36,12 +35,12 @@ var Status;
|
|
|
36
35
|
})(Status || (exports.Status = Status = {}));
|
|
37
36
|
var prefix = "activities_";
|
|
38
37
|
function ActivitiesTypeSlice(props) {
|
|
39
|
-
var _a, _b
|
|
38
|
+
var _a, _b;
|
|
40
39
|
var theme = (0, ThemeProvider_1.useTheme)();
|
|
41
|
-
var
|
|
40
|
+
var _c = (0, useActivities_1.default)(), activities = _c.activities, loadActivities = _c.loadActivities, loadOutActivityType = _c.loadOutActivityType;
|
|
42
41
|
var type = props.type, isActive = props.isActive, limitItems = props.limitItems, sx = props.sx;
|
|
43
|
-
var
|
|
44
|
-
var
|
|
42
|
+
var options = (0, TekWalletProvider_1.useWalletConfig)().options;
|
|
43
|
+
var basePath = (options || {}).basePath;
|
|
45
44
|
var activitiesByType = (0, react_1.useMemo)(function () {
|
|
46
45
|
if (!(type === null || type === void 0 ? void 0 : type.slug))
|
|
47
46
|
return undefined;
|
|
@@ -54,16 +53,6 @@ function ActivitiesTypeSlice(props) {
|
|
|
54
53
|
return Status.Filled;
|
|
55
54
|
return Status.Empty;
|
|
56
55
|
}, [type, activitiesByType]);
|
|
57
|
-
var openDetail = (0, react_1.useCallback)(function (activity) {
|
|
58
|
-
var _a;
|
|
59
|
-
setDetailActivity(activity);
|
|
60
|
-
(_a = detailDrawerRef.current) === null || _a === void 0 ? void 0 : _a.open();
|
|
61
|
-
}, []);
|
|
62
|
-
var closeDetail = (0, react_1.useCallback)(function (e) {
|
|
63
|
-
var _a;
|
|
64
|
-
e.stopPropagation();
|
|
65
|
-
(_a = detailDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
66
|
-
}, []);
|
|
67
56
|
(0, react_1.useEffect)(function () {
|
|
68
57
|
if (!isActive || !!activitiesByType)
|
|
69
58
|
return;
|
|
@@ -72,12 +61,14 @@ function ActivitiesTypeSlice(props) {
|
|
|
72
61
|
var loadMore = (0, react_1.useCallback)(function () {
|
|
73
62
|
loadActivities(type.slug);
|
|
74
63
|
}, [loadActivities, type.slug]);
|
|
75
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ width: "100%", height: "100%", display: "flex", paddingTop: theme.mixins.customPadding.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
64
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ width: "100%", height: "100%", display: "flex", paddingTop: theme.mixins.customPadding.p16, px: theme.mixins.customPadding.p16 }, sx), children: [status === Status.Loading && (0, jsx_runtime_1.jsx)(WaitingData_1.default, { sx: { marginBottom: "auto" } }), status === Status.Empty && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { marginBottom: "auto", marginTop: "4rem" }, icon: (0, getIcon_1.default)(prefix + "empty_" + type.slug), description: "No ".concat((_a = type.name) === null || _a === void 0 ? void 0 : _a.toLowerCase(), " activity") })), status === Status.Filled && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(SmartList_1.default, { loadMoreData: loadMore, hasMore: !loadOutActivityType[type.slug] &&
|
|
65
|
+
((activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.length) || 0) < (limitItems || Infinity), loadingComponent: (0, jsx_runtime_1.jsx)(WaitingData_1.default, { numberOfSkeleton: 3, sx: { marginTop: theme.mixins.customMargin.m12 } }), sx: {}, children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, pb: theme.mixins.customPadding.p32 }), children: (_b = activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.slice(0, limitItems)) === null || _b === void 0 ? void 0 : _b.map(function (activity, index) {
|
|
66
|
+
if (!activity)
|
|
67
|
+
return null;
|
|
68
|
+
var dataAsJson = JSON.stringify(activity);
|
|
69
|
+
return ((0, jsx_runtime_1.jsx)(ActivityItem_1.default
|
|
70
|
+
// onClick={() => openDetail(activity)}
|
|
71
|
+
, { data: dataAsJson, component: link_1.default, href: "".concat(basePath || "", "/tek-wallet/activity/").concat(activity.id) }, index));
|
|
72
|
+
}) }) }) }))] }));
|
|
82
73
|
}
|
|
83
74
|
exports.default = ActivitiesTypeSlice;
|
|
@@ -84,10 +84,12 @@ function ActivityDetail(props) {
|
|
|
84
84
|
borderRadius: theme.mixins.customRadius.full,
|
|
85
85
|
border: isSwap ? "0.25rem white solid" : "none",
|
|
86
86
|
ml: "-1rem",
|
|
87
|
-
} }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", gap: theme.mixins.gaps.g4, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize24, color: getAmountColor() }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: isIncrease ? "+" : "-", value: activityData.amount, unit: " ".concat(currency === null || currency === void 0 ? void 0 : currency.name) }) }), isSwap && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize24, color: theme.palette.text.successStatus }), 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: __assign({}, theme.mixins.valueDescription), children: (0, formatDate_1.default)(activityData.date_created) }), 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, {
|
|
87
|
+
} }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", gap: theme.mixins.gaps.g4, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize24, textAlign: "center", color: getAmountColor() }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: isIncrease ? "+" : "-", value: activityData.amount, unit: " ".concat(currency === null || currency === void 0 ? void 0 : currency.name) }) }), isSwap && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize24, color: theme.palette.text.successStatus }), 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: __assign({}, theme.mixins.valueDescription), children: (0, formatDate_1.default)(activityData.date_created, true) }), 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, { sx: {
|
|
88
|
+
color: theme.palette.text.loadingStatus,
|
|
89
|
+
}, size: 16 })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
88
90
|
fontSize: theme.typography.fontSize12,
|
|
89
91
|
textTransform: "capitalize",
|
|
90
92
|
color: getStatusColor(),
|
|
91
|
-
}, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.paper), { p:
|
|
93
|
+
}, 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.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 })] }) })), !!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.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: toAddress })] }) }))] })] }));
|
|
92
94
|
}
|
|
93
95
|
exports.default = ActivityDetail;
|
|
@@ -95,7 +95,9 @@ function ActivityItem(props) {
|
|
|
95
95
|
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.tertiary, 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: {
|
|
96
96
|
width: "fit-content",
|
|
97
97
|
height: "fit-content",
|
|
98
|
-
}, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { src: type === null || type === void 0 ? void 0 : type.link, width:
|
|
98
|
+
}, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { src: type === null || type === void 0 ? void 0 : type.link, width: 28, sx: { borderRadius: theme.mixins.customRadius.full } }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", gap: theme.mixins.gaps.g2 }), 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, { size: 12, sx: {
|
|
99
|
+
color: theme.palette.text.loadingStatus,
|
|
100
|
+
} })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
99
101
|
fontSize: theme.typography.fontSize12,
|
|
100
102
|
textTransform: "capitalize",
|
|
101
103
|
color: getStatusColor(),
|
|
@@ -20,16 +20,14 @@ var Formatter_1 = __importDefault(require("../Formatter"));
|
|
|
20
20
|
var material_1 = require("@mui/material");
|
|
21
21
|
var providers_1 = require("../../../providers");
|
|
22
22
|
var SvgPath_1 = require("../SvgPath");
|
|
23
|
-
var TimeFilter_1 = require("../TimeFilter");
|
|
24
23
|
var user_1 = __importDefault(require("../../../store/user"));
|
|
25
24
|
var balance_1 = __importDefault(require("../../../store/balance"));
|
|
26
25
|
var AnalyticGroup = function (props) {
|
|
27
|
-
var sx = props.sx
|
|
26
|
+
var sx = props.sx;
|
|
28
27
|
var theme = (0, providers_1.useTheme)();
|
|
29
28
|
var isShowBalance = (0, user_1.default)(function (state) { return state.settings.balance.isShowBalance; });
|
|
30
29
|
var toggleShowBalance = (0, user_1.default)(function (state) { return state.toggleShowBalance; });
|
|
31
30
|
var totalBalanceInUSD = (0, balance_1.default)(function (state) { return state.totalBalanceInUSD; });
|
|
32
|
-
var analytic = (0, balance_1.default)(function (state) { return state.analytic; });
|
|
33
31
|
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { justifyContent: "space-between", alignItems: "flex-start" }), sx), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g6, position: "relative" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
34
32
|
fontSize: theme.typography.fontSize15,
|
|
35
33
|
fontWeight: theme.typography.fontWeight500,
|
|
@@ -46,49 +44,19 @@ var AnalyticGroup = function (props) {
|
|
|
46
44
|
backgroundColor: theme.palette.text.accent2,
|
|
47
45
|
transform: "translate(calc(-50% + 1px), calc(-50% + 1px)) rotate(45deg)",
|
|
48
46
|
transformOrigin: "center center",
|
|
49
|
-
} })] })] }), (0, jsx_runtime_1.
|
|
47
|
+
} })] })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
50
48
|
display: "flex",
|
|
51
49
|
flexDirection: "column",
|
|
52
50
|
alignItems: "flex-end",
|
|
53
51
|
gap: theme.mixins.gaps.g6,
|
|
54
52
|
fontSize: theme.typography.fontSize12,
|
|
55
|
-
}, children:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
fontWeight: theme.typography.fontWeight600,
|
|
64
|
-
leading: theme.typography.leading140,
|
|
65
|
-
fontSize: theme.typography.fontSize12,
|
|
66
|
-
textTransform: "capitalize",
|
|
67
|
-
color: theme.palette.text.accent,
|
|
68
|
-
}, children: TimeFilter_1.TIME_FILTER_LABEL[timeRange] })), !!(analytic === null || analytic === void 0 ? void 0 : analytic.pnl) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isShowBalance && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 8, height: 8 }, children: SvgPath_1.ARROW_DROP_UP }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { color: theme.palette.text.alertStatus, fontSize: theme.typography.fontSize12, fontWeight: theme.typography.fontWeight600, borderBottom: "1px dashed currentColor" }), children: [(0, jsx_runtime_1.jsx)("span", { children: (analytic === null || analytic === void 0 ? void 0 : analytic.pnl) > 0 ? "+" : "" }), " ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: analytic === null || analytic === void 0 ? void 0 : analytic.pnl }), " ", "(", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: analytic === null || analytic === void 0 ? void 0 : analytic.pnl_percent, unit: "%" }), ")"] })] })), !isShowBalance && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
69
|
-
fontSize: theme.typography.fontSize12,
|
|
70
|
-
fontWeight: theme.typography.fontWeight600,
|
|
71
|
-
color: theme.palette.text.accent2,
|
|
72
|
-
display: theme.mixins.row,
|
|
73
|
-
}, children: "******" }))] }))] }), false && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
|
|
74
|
-
width: "110%",
|
|
75
|
-
borderColor: "".concat(theme.palette.border.accent),
|
|
76
|
-
opacity: 0.2,
|
|
77
|
-
marginTop: theme.mixins.customMargin.m4,
|
|
78
|
-
} }), isShowBalance && ((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)(Text_1.default, { sx: {
|
|
79
|
-
fontWeight: theme.typography.fontWeight500,
|
|
80
|
-
leading: theme.typography.leading140,
|
|
81
|
-
fontSize: theme.typography.fontSize12,
|
|
82
|
-
textTransform: "capitalize",
|
|
83
|
-
color: theme.palette.text.accent,
|
|
84
|
-
}, children: "Profit" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.row), children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
85
|
-
fontSize: theme.typography.fontSize12,
|
|
86
|
-
fontWeight: theme.typography.fontWeight600,
|
|
87
|
-
color: theme.palette.text.accent2,
|
|
88
|
-
}, children: "\u2248 250k XP" }) }) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 14, height: 14 }, children: SvgPath_1.IC_INFORMATION })] })), !isShowBalance && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
89
|
-
fontSize: theme.typography.fontSize12,
|
|
90
|
-
fontWeight: theme.typography.fontWeight600,
|
|
91
|
-
color: theme.palette.text.accent2,
|
|
92
|
-
}, children: "******" }))] }))] })] }));
|
|
53
|
+
}, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign(__assign({}, theme.mixins.row), theme.mixins.value), { alignItems: "baseline", fontSize: theme.typography.fontSize20, gap: theme.mixins.gaps.g2 }), children: isShowBalance ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: { fontWeight: theme.typography.fontWeight700 }, value: totalBalanceInUSD, unit: "USD", hideUnitOutSide: true }), !!totalBalanceInUSD && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g2 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
54
|
+
fontWeight: theme.typography.fontWeight400,
|
|
55
|
+
fontSize: "0.8em",
|
|
56
|
+
}, children: "$" }), false && ((0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 8, height: 8 }, children: SvgPath_1.ARROW_DROP_DOWN }))] }))] })) : ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
57
|
+
fontSize: theme.typography.fontSize24,
|
|
58
|
+
fontWeight: theme.typography.fontWeight700,
|
|
59
|
+
color: theme.palette.text.black,
|
|
60
|
+
}, children: "******" })) }) })] }));
|
|
93
61
|
};
|
|
94
62
|
exports.default = AnalyticGroup;
|
|
@@ -59,21 +59,22 @@ var SvgPath_1 = require("../SvgPath");
|
|
|
59
59
|
var CloseModal_1 = __importDefault(require("../CloseModal"));
|
|
60
60
|
var react_1 = require("react");
|
|
61
61
|
var link_1 = __importDefault(require("next/link"));
|
|
62
|
-
var routes_1 = require("../../views/TekWalletView/routes");
|
|
63
62
|
var TekWalletProvider_1 = require("../../../providers/TekWalletProvider");
|
|
63
|
+
var TekWalletView_1 = require("../../views/TekWalletView");
|
|
64
|
+
var Icon_1 = __importDefault(require("../Icon"));
|
|
64
65
|
var AssetViewHeader = function () {
|
|
65
66
|
var _a = (0, useWallet_1.default)(), masterWallet = _a.masterWallet, blockchainWallets = _a.blockchainWallets;
|
|
66
67
|
var options = (0, TekWalletProvider_1.useWalletConfig)().options;
|
|
67
68
|
var theme = (0, ThemeProvider_1.useTheme)();
|
|
68
69
|
var modalRef = (0, react_1.useRef)(null);
|
|
69
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "center", position: "relative" }), children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: modalRef, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { alignItems: "center", justifyContent: "center", textAlign: "center", gap: theme.mixins.gaps.g4, py: theme.mixins.customPadding.p8 }), theme.mixins.value), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1.25rem", height: "1.25rem" }, children: SvgPath_1.WALLET }), (0, compactWalletAddress_1.default)(masterWallet), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "0.625rem", height: "0.625rem" }, children: SvgPath_1.ARROW_DROP_DOWN })] }), direction: DrawerComponent_1.DRAWER_DIRECTION.TOP, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "center", position: "relative", boxShadow: "0 0 1px 2px rgba(0, 0, 0, 0.03)" }), children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: modalRef, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { alignItems: "center", justifyContent: "center", textAlign: "center", gap: theme.mixins.gaps.g4, py: theme.mixins.customPadding.p8 }), theme.mixins.value), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1.25rem", height: "1.25rem" }, children: SvgPath_1.WALLET }), (0, compactWalletAddress_1.default)(masterWallet), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "0.625rem", height: "0.625rem" }, children: SvgPath_1.ARROW_DROP_DOWN })] }), direction: DrawerComponent_1.DRAWER_DIRECTION.TOP, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
70
71
|
width: "100%",
|
|
71
72
|
height: "fit-content",
|
|
72
73
|
backgroundColor: "white",
|
|
73
74
|
padding: theme.mixins.customPadding.p16,
|
|
74
|
-
}, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { component: "div", sx: __assign(__assign({}, theme.mixins.headerTitle), { py: theme.mixins.customPadding.p8, textAlign: "left" }), children: "Wallet address" }), (0, jsx_runtime_1.jsx)(CloseModal_1.default, { onClick: function () { var _a; return (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.close(); } })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [!!masterWallet && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: masterWallet !== null && masterWallet !== void 0 ? masterWallet : "", messageSuccess: "Copied "
|
|
75
|
+
}, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { component: "div", sx: __assign(__assign({}, theme.mixins.headerTitle), { py: theme.mixins.customPadding.p8, textAlign: "left" }), children: "Wallet address" }), (0, jsx_runtime_1.jsx)(CloseModal_1.default, { onClick: function () { var _a; return (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.close(); } })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [!!masterWallet && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: masterWallet !== null && masterWallet !== void 0 ? masterWallet : "", messageSuccess: "Copied Internal address", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ py: theme.mixins.customPadding.p8 }, theme.mixins.row), { justifyContent: "space-between", alignItems: "center", gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1.75rem", height: "1.75rem", opacity: 0.7 }, children: SvgPath_1.WALLET }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.listTitle), children: "Internal wallet" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.listDescription), children: (0, compactWalletAddress_1.default)(masterWallet) })] }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1rem", height: "1rem" }, children: SvgPath_1.IC_COPY })] }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
|
|
75
76
|
my: theme.mixins.customPadding.p8,
|
|
76
|
-
} })] })), blockchainWallets === null || blockchainWallets === void 0 ? void 0 : blockchainWallets.map(function (wallet, index) { return ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: wallet.blockchainAddress, messageSuccess: "Copied ".concat(
|
|
77
|
+
} })] })), blockchainWallets === null || blockchainWallets === void 0 ? void 0 : blockchainWallets.map(function (wallet, index) { return ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: wallet.blockchainAddress, messageSuccess: "Copied ".concat(wallet.networkName, " address"), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ py: theme.mixins.customPadding.p8 }, theme.mixins.row), { gap: theme.mixins.gaps.g8, justifyContent: "space-between", alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: wallet.networkIcon, width: 28, sx: { borderRadius: theme.mixins.customRadius.full } }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.listTitle), children: wallet.networkName }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.listDescription), children: (0, compactWalletAddress_1.default)(wallet.blockchainAddress) })] }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1rem", height: "1rem" }, children: SvgPath_1.IC_COPY })] }) }, wallet.blockchainAddress + index)); })] })] }) }), (0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat((options === null || options === void 0 ? void 0 : options.basePath) || "", "/tek-wallet/").concat(TekWalletView_1.TekWalletViewRoutes.SETTING), children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
|
|
77
78
|
width: "1.5rem",
|
|
78
79
|
height: "1.5rem",
|
|
79
80
|
position: "absolute",
|
|
@@ -66,7 +66,7 @@ var link_1 = __importDefault(require("next/link"));
|
|
|
66
66
|
var DrawerComponent_1 = __importStar(require("../DrawerComponent"));
|
|
67
67
|
var theme_1 = __importDefault(require("../../../theme/mui/deposit-fiat-theme/theme"));
|
|
68
68
|
var Icon_1 = __importDefault(require("../Icon"));
|
|
69
|
-
var Button_1 =
|
|
69
|
+
var Button_1 = __importStar(require("../Button"));
|
|
70
70
|
var Text_1 = __importDefault(require("../Text"));
|
|
71
71
|
var style_1 = require("./style");
|
|
72
72
|
var palette_1 = require("../../../theme/mui/deposit-fiat-theme/palette");
|
|
@@ -208,13 +208,19 @@ function FiatDeposit(_a) {
|
|
|
208
208
|
borderColor: theme_1.default.palette.accent3.main,
|
|
209
209
|
borderRadius: "1rem",
|
|
210
210
|
gap: "0.5rem",
|
|
211
|
+
opacity: loading ? 0.5 : 1,
|
|
212
|
+
pointerEvents: loading ? "none" : "auto",
|
|
211
213
|
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.title02), color: (_b = palette_1.palette.positive) === null || _b === void 0 ? void 0 : _b.main, children: "You Pay" }), (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Input, { autoFocus: true, alwaysFocus: true, ref: amountInputRef, elementsAcceptIds: ["amount-keyboard-id"], value: inputAmount === null || inputAmount === void 0 ? void 0 : inputAmount.toString(), displayType: xhub_keyboard_1.DisplayType.Double, styles: {
|
|
212
214
|
container: {
|
|
213
215
|
border: "1px solid ".concat(error ? theme_1.default.palette.error.main : theme_1.default.palette.primary.main),
|
|
214
216
|
},
|
|
215
217
|
}, rightElement: (0, jsx_runtime_1.jsxs)(material_1.Stack, { flexDirection: "row", alignItems: "center", gap: "4px", flexShrink: 0, pl: "1rem", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { alt: "", width: 16, height: 16, sx: {
|
|
216
218
|
borderRadius: "999px",
|
|
217
|
-
}, src: (_d = (_c = tokens === null || tokens === void 0 ? void 0 : tokens.find(function (item) { return item.currency_slug.toLocaleLowerCase() === "vnd"; })) === null || _c === void 0 ? void 0 : _c.currency.link) !== null && _d !== void 0 ? _d : "/" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.title03), color: (_e = palette_1.palette.accent2) === null || _e === void 0 ? void 0 : _e.main, children: "VND" })] }) }) }), error && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, style_1.content02), display: "flex", alignItems: "center", gap: "4px", className: "text-error", children: [(0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M7 5.25V7.4375M12.25 7C12.25 7.68944 12.1142 8.37213 11.8504 9.00909C11.5865 9.64605 11.1998 10.2248 10.7123 10.7123C10.2248 11.1998 9.64605 11.5865 9.00909 11.8504C8.37213 12.1142 7.68944 12.25 7 12.25C6.31056 12.25 5.62787 12.1142 4.99091 11.8504C4.35395 11.5865 3.7752 11.1998 3.28769 10.7123C2.80018 10.2248 2.41347 9.64605 2.14963 9.00909C1.8858 8.37213 1.75 7.68944 1.75 7C1.75 5.60761 2.30312 4.27226 3.28769 3.28769C4.27226 2.30312 5.60761 1.75 7 1.75C8.39239 1.75 9.72774 2.30312 10.7123 3.28769C11.6969 4.27226 12.25 5.60761 12.25 7ZM7 9.1875H7.00467V9.19217H7V9.1875Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }) }), error] }))] }) }), (0, jsx_runtime_1.jsx)(material_1.Stack, { pt: "12px", id: "input-amount-action", children: (0, jsx_runtime_1.jsx)(material_1.Box, { px: "1rem", pb: "1.5rem", children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, {
|
|
219
|
+
}, src: (_d = (_c = tokens === null || tokens === void 0 ? void 0 : tokens.find(function (item) { return item.currency_slug.toLocaleLowerCase() === "vnd"; })) === null || _c === void 0 ? void 0 : _c.currency.link) !== null && _d !== void 0 ? _d : "/" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.title03), color: (_e = palette_1.palette.accent2) === null || _e === void 0 ? void 0 : _e.main, children: "VND" })] }) }) }), error && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, style_1.content02), display: "flex", alignItems: "center", gap: "4px", className: "text-error", children: [(0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M7 5.25V7.4375M12.25 7C12.25 7.68944 12.1142 8.37213 11.8504 9.00909C11.5865 9.64605 11.1998 10.2248 10.7123 10.7123C10.2248 11.1998 9.64605 11.5865 9.00909 11.8504C8.37213 12.1142 7.68944 12.25 7 12.25C6.31056 12.25 5.62787 12.1142 4.99091 11.8504C4.35395 11.5865 3.7752 11.1998 3.28769 10.7123C2.80018 10.2248 2.41347 9.64605 2.14963 9.00909C1.8858 8.37213 1.75 7.68944 1.75 7C1.75 5.60761 2.30312 4.27226 3.28769 3.28769C4.27226 2.30312 5.60761 1.75 7 1.75C8.39239 1.75 9.72774 2.30312 10.7123 3.28769C11.6969 4.27226 12.25 5.60761 12.25 7ZM7 9.1875H7.00467V9.19217H7V9.1875Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }) }), error] }))] }) }), (0, jsx_runtime_1.jsx)(material_1.Stack, { pt: "12px", id: "input-amount-action", children: (0, jsx_runtime_1.jsx)(material_1.Box, { px: "1rem", pb: "1.5rem", children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { status: !!error || !inputAmount
|
|
220
|
+
? Button_1.BUTTON_STATUS.DISABLED
|
|
221
|
+
: loading
|
|
222
|
+
? Button_1.BUTTON_STATUS.LOADING
|
|
223
|
+
: Button_1.BUTTON_STATUS.ENABLED, onClick: handleClick, fullWidth: true, children: "Continue" }) }) })] }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Drawer, { classes: { paper: "w-full" }, open: openQR, onClose: function () { return setOpenQR(false); }, anchor: "right", keepMounted: false, onClick: function (e) { return e.stopPropagation(); }, children: [(0, jsx_runtime_1.jsx)(Header, { handleBack: function () {
|
|
218
224
|
setOpen(false);
|
|
219
225
|
setOpenQR(false);
|
|
220
226
|
setInputAmount("");
|
|
@@ -101,24 +101,24 @@ var AssetView = function (props) {
|
|
|
101
101
|
}, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_RECEIVE", label: "Receive", sx: {
|
|
102
102
|
width: "100%",
|
|
103
103
|
} }) }) }, "receive"),
|
|
104
|
-
(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath, "/tek-wallet/send/external"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { sx: {
|
|
104
|
+
(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath || "", "/tek-wallet/send/external"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { sx: {
|
|
105
105
|
borderRight: "1px solid ".concat(theme.palette.border.accent3),
|
|
106
106
|
placeContent: "center",
|
|
107
107
|
columnSpan: 1,
|
|
108
108
|
}, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_WITHDRAW_FC", label: "Withdraw", sx: { width: "100%" } }) }) }, "withdraw"),
|
|
109
|
-
(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath, "/tek-wallet/send/internal"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { sx: {
|
|
109
|
+
(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath || "", "/tek-wallet/send/internal"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { sx: {
|
|
110
110
|
borderRight: "1px solid ".concat(theme.palette.border.accent3),
|
|
111
111
|
placeContent: "center",
|
|
112
112
|
columnSpan: 1,
|
|
113
113
|
}, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_TRANSFER", label: "Transfer", sx: { width: "100%" } }) }) }, "send-internal"),
|
|
114
|
-
(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath, "/tek-wallet/swap"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { sx: {
|
|
114
|
+
(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath || "", "/tek-wallet/swap"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { sx: {
|
|
115
115
|
placeContent: "center",
|
|
116
116
|
columnSpan: 1,
|
|
117
117
|
}, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_SWAP_FC", label: "Swap", sx: { width: "100%" } }) }) }, "swap"),
|
|
118
118
|
] }), !hideActivitySectionInAssetView && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
119
119
|
display: "flex",
|
|
120
120
|
gap: theme.mixins.gaps.g20,
|
|
121
|
-
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: "Activity" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { component: link_1.default, href: "".concat(basePath, "/tek-wallet/activity"), sx: {
|
|
121
|
+
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: "Activity" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { component: link_1.default, href: "".concat(basePath || "", "/tek-wallet/activity"), sx: {
|
|
122
122
|
marginLeft: "auto",
|
|
123
123
|
display: "flex",
|
|
124
124
|
alignItems: "center",
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GeneralProps } from "../../../types/ui";
|
|
2
|
+
import { SxProps } from "@mui/material";
|
|
3
|
+
interface DetailActivityViewProps extends GeneralProps {
|
|
4
|
+
sx?: SxProps;
|
|
5
|
+
id?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const DetailActivityView: (props: DetailActivityViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default DetailActivityView;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DetailActivityView = void 0;
|
|
8
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
+
var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
|
|
10
|
+
var PageHeader_1 = __importDefault(require("../../ui/PageHeader"));
|
|
11
|
+
var useWallet_1 = __importDefault(require("../../../hooks/useWallet"));
|
|
12
|
+
var react_1 = require("react");
|
|
13
|
+
var ActivityDetail_1 = __importDefault(require("../../ui/ActivityDetail"));
|
|
14
|
+
var EmptyData_1 = __importDefault(require("../../ui/EmptyData"));
|
|
15
|
+
var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
|
|
16
|
+
var DefaultPageLayout_1 = __importDefault(require("../../layouts/DefaultPageLayout"));
|
|
17
|
+
var DetailActivityView = function (props) {
|
|
18
|
+
var sx = props.sx, id = props.id;
|
|
19
|
+
var activities = (0, useWallet_1.default)().activities;
|
|
20
|
+
var _a = (0, react_1.useState)(null), activityData = _a[0], setActivityData = _a[1];
|
|
21
|
+
(0, react_1.useEffect)(function () {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
if (activities) {
|
|
24
|
+
var activity = (_b = (_a = Object.values(activities)) === null || _a === void 0 ? void 0 : _a.flat()) === null || _b === void 0 ? void 0 : _b.find(function (activity) { return "".concat(activity.id) === "".concat(id); });
|
|
25
|
+
setActivityData(activity || null);
|
|
26
|
+
}
|
|
27
|
+
}, [activities, id]);
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Detail" }), sx: sx, children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { children: [activityData && (0, jsx_runtime_1.jsx)(ActivityDetail_1.default, { activityData: activityData }), !activityData && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { marginBottom: "auto", marginTop: "4rem" }, icon: (0, getIcon_1.default)("empty_" + "all"), description: "Activity not found", children: "Activity not found" }))] }) }));
|
|
29
|
+
};
|
|
30
|
+
exports.DetailActivityView = DetailActivityView;
|
|
31
|
+
exports.default = exports.DetailActivityView;
|
|
@@ -86,10 +86,7 @@ function Summary(props) {
|
|
|
86
86
|
flexDirection: "column",
|
|
87
87
|
gap: 3,
|
|
88
88
|
height: "100%",
|
|
89
|
-
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
90
|
-
fontSize: 16,
|
|
91
|
-
fontWeight: 600,
|
|
92
|
-
}, children: "Transaction summary" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
89
|
+
}, 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: {
|
|
93
90
|
display: "flex",
|
|
94
91
|
flexDirection: "column",
|
|
95
92
|
gap: 3,
|
package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.js
CHANGED
|
@@ -370,7 +370,7 @@ function Form(props) {
|
|
|
370
370
|
placeholder: "Enter comment if needed",
|
|
371
371
|
value: comment,
|
|
372
372
|
onChange: handleChangeComment,
|
|
373
|
-
} })
|
|
373
|
+
} })] }), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: estimateFee, amount: +amount, tokenSlug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "", feesStyle: Fees_1.FeesStyle.WITH_BACKGROUND, setIsEnoughBalanceToPayFee: setIsEnoughBalanceToPayFee }), (0, jsx_runtime_1.jsx)(QrCodeReader_1.default, { ref: scannerAddressQrCodeRef, onResult: handleScanAddressQrCode }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { loading: isValidatingAddress || isEstimatingFee, onClick: handleContinue, status: !recipientAddress ||
|
|
374
374
|
!amount ||
|
|
375
375
|
!!recipientAddressError ||
|
|
376
376
|
!!amountError ||
|
|
@@ -371,7 +371,7 @@ function Form(props) {
|
|
|
371
371
|
placeholder: "Enter comment if needed",
|
|
372
372
|
value: comment,
|
|
373
373
|
onChange: handleChangeComment,
|
|
374
|
-
} })
|
|
374
|
+
} })] }), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: estimateFee, amount: +amount, tokenSlug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "", feesStyle: Fees_1.FeesStyle.WITH_BACKGROUND, setIsEnoughBalanceToPayFee: setIsEnoughBalanceToPayFee }), (0, jsx_runtime_1.jsx)(QrCodeReader_1.default, { ref: scannerAddressQrCodeRef, onResult: handleScanAddressQrCode }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { loading: isValidatingAddress || isEstimatingFee, onClick: handleContinue, status: !recipientAddress ||
|
|
375
375
|
!amount ||
|
|
376
376
|
!!recipientAddressError ||
|
|
377
377
|
!!amountError ||
|
|
@@ -85,10 +85,7 @@ function Summary(props) {
|
|
|
85
85
|
flexDirection: "column",
|
|
86
86
|
gap: 3,
|
|
87
87
|
height: "100%",
|
|
88
|
-
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
89
|
-
fontSize: 16,
|
|
90
|
-
fontWeight: 600,
|
|
91
|
-
}, children: "Transaction summary" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
88
|
+
}, 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: {
|
|
92
89
|
display: "flex",
|
|
93
90
|
flexDirection: "column",
|
|
94
91
|
gap: 3,
|
|
@@ -23,7 +23,6 @@ var material_1 = require("@mui/material");
|
|
|
23
23
|
var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
|
|
24
24
|
var ListItemCustom_1 = __importDefault(require("../../ui/ListItemCustom"));
|
|
25
25
|
var ChangePasscode_1 = __importDefault(require("../../ui/ChangePasscode"));
|
|
26
|
-
var Button_1 = __importDefault(require("../../ui/Button"));
|
|
27
26
|
var providers_1 = require("../../../providers");
|
|
28
27
|
var TekWalletProvider_1 = require("../../../providers/TekWalletProvider");
|
|
29
28
|
var SvgPath_1 = require("../../ui/SvgPath");
|
|
@@ -31,16 +30,17 @@ var SettingView = function (props) {
|
|
|
31
30
|
var _a = props;
|
|
32
31
|
var theme = (0, providers_1.useTheme)();
|
|
33
32
|
var onLogout = (0, TekWalletProvider_1.useWalletConfig)().onLogout;
|
|
34
|
-
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Setting" }), children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16 }), children: [(0, jsx_runtime_1.jsx)(ChangePasscode_1.default, { children: (0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { hideTag: true, title: "Change Passcode", description: "Change your passcode", icon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width:
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Setting" }), children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16 }), children: [(0, jsx_runtime_1.jsx)(ChangePasscode_1.default, { children: (0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { hideTag: true, title: "Change Passcode", description: "Change your passcode", icon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "2rem", height: "2rem" }, children: SvgPath_1.IC_CHANGE_PASSCODE }) }) }), (0, jsx_runtime_1.jsx)("button", { style: {
|
|
35
34
|
marginTop: "auto",
|
|
36
35
|
borderRadius: theme.mixins.customRadius.r12,
|
|
37
36
|
textTransform: "capitalize",
|
|
38
37
|
position: "relative",
|
|
39
|
-
|
|
40
|
-
py: theme.mixins.customPadding.p12,
|
|
38
|
+
padding: "".concat(theme.mixins.customPadding.p12, " ").concat(theme.mixins.customPadding.p16),
|
|
41
39
|
fontWeight: theme.typography.fontWeight500,
|
|
42
40
|
fontSize: theme.typography.fontSize14,
|
|
43
41
|
lineHeight: theme.typography.leading100,
|
|
42
|
+
backgroundColor: theme.palette.background.error,
|
|
43
|
+
color: theme.palette.text.white,
|
|
44
44
|
}, onClick: onLogout, children: "Logout" })] }) }));
|
|
45
45
|
};
|
|
46
46
|
exports.SettingView = SettingView;
|
|
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./routes"), exports);
|
|
18
17
|
__exportStar(require("./index"), exports);
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
export declare enum TekWalletViewRoutes {
|
|
2
|
+
SEND_INTERNAL = "/send/internal",
|
|
3
|
+
SEND_EXTERNAL = "/send/external",
|
|
4
|
+
SWAP = "/swap",
|
|
5
|
+
ASSET = "/",
|
|
6
|
+
NOT_FOUND = "/not-found",
|
|
7
|
+
ACTIVITY = "/activity",
|
|
8
|
+
SETTING = "/setting"
|
|
9
|
+
}
|
|
1
10
|
export interface TekWalletViewProps {
|
|
2
11
|
}
|
|
3
12
|
export interface TekWalletViewProps {
|
|
@@ -1,16 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
3
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.TekWalletViewRoutes = void 0;
|
|
4
8
|
exports.TekWalletView = TekWalletView;
|
|
5
9
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
10
|
var navigation_1 = require("next/navigation");
|
|
7
11
|
var react_1 = require("react");
|
|
8
|
-
var
|
|
12
|
+
var NotFoundView_1 = __importDefault(require("../NotFoundView"));
|
|
13
|
+
var SendInternalView_1 = __importDefault(require("../SendInternalView"));
|
|
14
|
+
var SendExternalView_1 = __importDefault(require("../SendExternalView"));
|
|
15
|
+
var SwapView_1 = __importDefault(require("../SwapView"));
|
|
16
|
+
var AssetView_1 = __importDefault(require("../AssetView"));
|
|
17
|
+
var DetailActivityView_1 = __importDefault(require("../DetailActivityView"));
|
|
18
|
+
var ActivityView_1 = __importDefault(require("../ActivityView"));
|
|
19
|
+
var SettingView_1 = __importDefault(require("../SettingView"));
|
|
20
|
+
var TekWalletViewRoutes;
|
|
21
|
+
(function (TekWalletViewRoutes) {
|
|
22
|
+
TekWalletViewRoutes["SEND_INTERNAL"] = "/send/internal";
|
|
23
|
+
TekWalletViewRoutes["SEND_EXTERNAL"] = "/send/external";
|
|
24
|
+
TekWalletViewRoutes["SWAP"] = "/swap";
|
|
25
|
+
TekWalletViewRoutes["ASSET"] = "/";
|
|
26
|
+
TekWalletViewRoutes["NOT_FOUND"] = "/not-found";
|
|
27
|
+
TekWalletViewRoutes["ACTIVITY"] = "/activity";
|
|
28
|
+
TekWalletViewRoutes["SETTING"] = "/setting";
|
|
29
|
+
})(TekWalletViewRoutes || (exports.TekWalletViewRoutes = TekWalletViewRoutes = {}));
|
|
9
30
|
function TekWalletView() {
|
|
31
|
+
var _a, _b, _c, _d;
|
|
10
32
|
var pathname = (0, navigation_1.useParams)().pathname;
|
|
11
33
|
var pathnameArray = (0, react_1.useMemo)(function () { return (typeof pathname === "string" ? [pathname] : pathname); }, [pathname]);
|
|
12
34
|
var pathnameFull = (0, react_1.useMemo)(function () { return pathnameArray === null || pathnameArray === void 0 ? void 0 : pathnameArray.join("/"); }, [pathnameArray]);
|
|
13
35
|
console.warn("🚀 ~ TekWalletView ~ pathnameFull:", pathname, pathnameFull);
|
|
14
|
-
var
|
|
15
|
-
|
|
36
|
+
var path = (0, react_1.useMemo)(function () { return (pathname === undefined ? "/" : "/".concat(pathnameFull)); }, [pathnameFull, pathname]);
|
|
37
|
+
if (path.startsWith(TekWalletViewRoutes.SEND_INTERNAL)) {
|
|
38
|
+
return (0, jsx_runtime_1.jsx)(SendInternalView_1.default, {});
|
|
39
|
+
}
|
|
40
|
+
if (path.startsWith(TekWalletViewRoutes.SEND_EXTERNAL)) {
|
|
41
|
+
return (0, jsx_runtime_1.jsx)(SendExternalView_1.default, {});
|
|
42
|
+
}
|
|
43
|
+
if (path.startsWith(TekWalletViewRoutes.SWAP)) {
|
|
44
|
+
return (0, jsx_runtime_1.jsx)(SwapView_1.default, {});
|
|
45
|
+
}
|
|
46
|
+
if (path === TekWalletViewRoutes.ASSET) {
|
|
47
|
+
return (0, jsx_runtime_1.jsx)(AssetView_1.default, {});
|
|
48
|
+
}
|
|
49
|
+
if (path.startsWith(TekWalletViewRoutes.ACTIVITY) &&
|
|
50
|
+
((_b = (_a = path === null || path === void 0 ? void 0 : path.split("/")) === null || _a === void 0 ? void 0 : _a.filter(Boolean)) === null || _b === void 0 ? void 0 : _b.length) > 1) {
|
|
51
|
+
return (0, jsx_runtime_1.jsx)(DetailActivityView_1.default, { id: (_d = (_c = path === null || path === void 0 ? void 0 : path.split("/")) === null || _c === void 0 ? void 0 : _c.filter(Boolean)) === null || _d === void 0 ? void 0 : _d[1] });
|
|
52
|
+
}
|
|
53
|
+
if (path.startsWith(TekWalletViewRoutes.ACTIVITY)) {
|
|
54
|
+
return (0, jsx_runtime_1.jsx)(ActivityView_1.default, {});
|
|
55
|
+
}
|
|
56
|
+
if (path.startsWith(TekWalletViewRoutes.SETTING)) {
|
|
57
|
+
return (0, jsx_runtime_1.jsx)(SettingView_1.default, {});
|
|
58
|
+
}
|
|
59
|
+
return (0, jsx_runtime_1.jsx)(NotFoundView_1.default, {});
|
|
16
60
|
}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
+
var __assign = (this && this.__assign) || function () {
|
|
4
|
+
__assign = Object.assign || function(t) {
|
|
5
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
+
s = arguments[i];
|
|
7
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
+
t[p] = s[p];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
return __assign.apply(this, arguments);
|
|
13
|
+
};
|
|
3
14
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
15
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
16
|
};
|
|
@@ -9,9 +20,17 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
9
20
|
var react_1 = require("react");
|
|
10
21
|
var useEventHandler_1 = require("../../hooks/useEventHandler");
|
|
11
22
|
var useRealtime_1 = __importDefault(require("../../hooks/useRealtime"));
|
|
23
|
+
var TekWalletProvider_1 = require("../TekWalletProvider");
|
|
24
|
+
var useCustomRouter_1 = __importDefault(require("../../hooks/useCustomRouter"));
|
|
25
|
+
var type_1 = require("../../services/axios/get-activities-service/type");
|
|
12
26
|
function EventHandlerProvider(props) {
|
|
13
27
|
var _a = (0, useEventHandler_1.useEventHandler)(), transactionHandler = _a.transactionHandler, walletInfoHandler = _a.walletInfoHandler;
|
|
14
28
|
var _b = (0, useRealtime_1.default)(), pushNotification = _b.pushNotification, transaction = _b.transaction, walletHandlerInfo = _b.walletHandlerInfo;
|
|
29
|
+
var router = (0, useCustomRouter_1.default)();
|
|
30
|
+
var options = (0, TekWalletProvider_1.useWalletConfig)().options;
|
|
31
|
+
(0, react_1.useEffect)(function () {
|
|
32
|
+
router.prefetch("".concat(options === null || options === void 0 ? void 0 : options.basePath, "/tek-wallet/activities/abc"));
|
|
33
|
+
}, [router, options === null || options === void 0 ? void 0 : options.basePath]);
|
|
15
34
|
(0, react_1.useEffect)(function () {
|
|
16
35
|
var _a;
|
|
17
36
|
if (!transactionHandler || !transaction)
|
|
@@ -21,8 +40,13 @@ function EventHandlerProvider(props) {
|
|
|
21
40
|
if ((_a = theMessage.id) === null || _a === void 0 ? void 0 : _a.includes("processing")) {
|
|
22
41
|
return;
|
|
23
42
|
}
|
|
24
|
-
|
|
25
|
-
|
|
43
|
+
var onClickNotification = function () {
|
|
44
|
+
if (transaction.status !== type_1.TransactionStatus.Success)
|
|
45
|
+
return;
|
|
46
|
+
router.push("".concat(options === null || options === void 0 ? void 0 : options.basePath, "/tek-wallet/activities/").concat(transaction.id));
|
|
47
|
+
};
|
|
48
|
+
console.warn("🚀 ~ EventHandlerProvider ~ theMessage:", transaction, theMessage);
|
|
49
|
+
pushNotification(__assign(__assign({}, theMessage), { onClick: onClickNotification }));
|
|
26
50
|
}
|
|
27
51
|
}, [transaction]);
|
|
28
52
|
(0, react_1.useEffect)(function () {
|
|
@@ -66,6 +66,7 @@ var ably_service_1 = require("../../services/ably/ably.service");
|
|
|
66
66
|
var material_1 = require("@mui/material");
|
|
67
67
|
var notistack_1 = require("notistack");
|
|
68
68
|
var ThemeProvider_1 = require("../ThemeProvider");
|
|
69
|
+
var CloseModal_1 = __importDefault(require("../../components/ui/CloseModal"));
|
|
69
70
|
exports.initialRealtime = {
|
|
70
71
|
transaction: undefined,
|
|
71
72
|
walletHandlerInfo: undefined,
|
|
@@ -128,16 +129,43 @@ function RealtimeProvider(_a) {
|
|
|
128
129
|
horizontal: (_e = (_d = notification === null || notification === void 0 ? void 0 : notification.anchorOrigin) === null || _d === void 0 ? void 0 : _d.horizontal) !== null && _e !== void 0 ? _e : "right",
|
|
129
130
|
}, onClose: function () {
|
|
130
131
|
closeNotification(notification.id);
|
|
131
|
-
}, slots: { transition: GrowTransition }, autoHideDuration: (_f = notification.duration) !== null && _f !== void 0 ? _f : 5000, children: (0, jsx_runtime_1.
|
|
132
|
-
width: "
|
|
133
|
-
|
|
132
|
+
}, slots: { transition: GrowTransition }, autoHideDuration: (_f = notification.duration) !== null && _f !== void 0 ? _f : 5000, children: (0, jsx_runtime_1.jsxs)(material_1.Alert, { onClick: notification.onClick, icon: false, severity: notification.type, sx: {
|
|
133
|
+
width: "100%",
|
|
134
|
+
maxWidth: "calc(100vw - 2rem)",
|
|
135
|
+
borderRadius: theme.mixins.customRadius.r12,
|
|
134
136
|
mx: "auto",
|
|
135
137
|
padding: "".concat(theme.mixins.customPadding.p0, " ").concat(theme.mixins.customPadding.p12),
|
|
136
138
|
fontSize: theme.typography.fontSize14,
|
|
139
|
+
position: "relative",
|
|
140
|
+
transform: "translateY(0.5rem) !important",
|
|
141
|
+
backgroundColor: theme.palette.background.white24,
|
|
142
|
+
color: theme.palette.text.black,
|
|
143
|
+
backdropFilter: "blur(24px)",
|
|
144
|
+
border: "1px solid ".concat(theme.palette.border.accent3),
|
|
145
|
+
boxShadow: "1px 1px 10px 1px rgba(0, 0, 0, 0.07)",
|
|
137
146
|
"& .MuiAlert-message": {
|
|
138
|
-
padding: "".concat(theme.mixins.customPadding.
|
|
147
|
+
padding: "".concat(theme.mixins.customPadding.p12, " ").concat(theme.mixins.customPadding.p8),
|
|
139
148
|
},
|
|
140
|
-
}, children: notification.message
|
|
149
|
+
}, children: [notification.message, " ", (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
150
|
+
color: "inherit",
|
|
151
|
+
position: "absolute",
|
|
152
|
+
right: 0,
|
|
153
|
+
bottom: 0,
|
|
154
|
+
aspectRatio: "1/1",
|
|
155
|
+
boxShadow: "1px 1px 10px 1px rgba(0, 0, 0, 0.07)",
|
|
156
|
+
backgroundColor: theme.palette.background.white,
|
|
157
|
+
border: "1px solid ".concat(theme.palette.border.accent),
|
|
158
|
+
padding: theme.mixins.customPadding.p6,
|
|
159
|
+
borderRadius: "999px",
|
|
160
|
+
transform: "translate(30%, 30%)",
|
|
161
|
+
}, onClick: function (e) {
|
|
162
|
+
e.stopPropagation();
|
|
163
|
+
closeNotification(notification.id);
|
|
164
|
+
}, children: (0, jsx_runtime_1.jsx)(CloseModal_1.default, { sx: {
|
|
165
|
+
width: "0.625rem",
|
|
166
|
+
height: "0.625rem",
|
|
167
|
+
display: "block",
|
|
168
|
+
} }) })] }) }, notification.id));
|
|
141
169
|
}) }))] }));
|
|
142
170
|
}
|
|
143
171
|
exports.default = RealtimeProvider;
|
|
@@ -168,6 +168,8 @@ function WalletDataProvider(props) {
|
|
|
168
168
|
setBlockchainWallets(response === null || response === void 0 ? void 0 : response.blockchain_wallets.map(function (item) { return ({
|
|
169
169
|
blockchainAddress: item.blockchain_address,
|
|
170
170
|
networkSlug: item.network_slug,
|
|
171
|
+
networkName: item.network_name,
|
|
172
|
+
networkIcon: item.network_icon,
|
|
171
173
|
}); }));
|
|
172
174
|
setIsTokensLoading(false);
|
|
173
175
|
return [3 /*break*/, 3];
|
|
@@ -172,6 +172,8 @@ function WalletDataProviderNoImport(_a) {
|
|
|
172
172
|
setBlockchainWallets(response === null || response === void 0 ? void 0 : response.blockchain_wallets.map(function (item) { return ({
|
|
173
173
|
blockchainAddress: item.blockchain_address,
|
|
174
174
|
networkSlug: item.network_slug,
|
|
175
|
+
networkName: item.network_name,
|
|
176
|
+
networkIcon: item.network_icon,
|
|
175
177
|
}); }));
|
|
176
178
|
setPolicyInfo(response === null || response === void 0 ? void 0 : response.policy_info);
|
|
177
179
|
setIsTokensLoading(false);
|
|
@@ -143,10 +143,14 @@ export interface BlockchainWallet {
|
|
|
143
143
|
master_address: string;
|
|
144
144
|
blockchain_address: string;
|
|
145
145
|
network_slug: string;
|
|
146
|
+
network_name: string;
|
|
147
|
+
network_icon: string;
|
|
146
148
|
}
|
|
147
149
|
export interface BlockchainWalletType {
|
|
148
150
|
blockchainAddress: string;
|
|
149
151
|
networkSlug: string;
|
|
152
|
+
networkName: string;
|
|
153
|
+
networkIcon: string;
|
|
150
154
|
}
|
|
151
155
|
export interface Balance {
|
|
152
156
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare enum TekWalletViewRoutes {
|
|
2
|
-
SEND_INTERNAL = "/send/internal",
|
|
3
|
-
SEND_EXTERNAL = "/send/external",
|
|
4
|
-
SWAP = "/swap",
|
|
5
|
-
ASSET = "/",
|
|
6
|
-
NOT_FOUND = "/not-found",
|
|
7
|
-
ACTIVITY = "/activity",
|
|
8
|
-
SETTING = "/setting"
|
|
9
|
-
}
|
|
10
|
-
export declare const getView: (path: string) => any;
|
|
@@ -1,45 +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
|
-
exports.getView = exports.TekWalletViewRoutes = void 0;
|
|
7
|
-
var ActivityView_1 = __importDefault(require("../ActivityView"));
|
|
8
|
-
var AssetView_1 = __importDefault(require("../AssetView"));
|
|
9
|
-
var NotFoundView_1 = __importDefault(require("../NotFoundView"));
|
|
10
|
-
var SendExternalView_1 = __importDefault(require("../SendExternalView"));
|
|
11
|
-
var SendInternalView_1 = require("../SendInternalView");
|
|
12
|
-
var SettingView_1 = require("../SettingView");
|
|
13
|
-
var SwapView_1 = require("../SwapView");
|
|
14
|
-
var TekWalletViewRoutes;
|
|
15
|
-
(function (TekWalletViewRoutes) {
|
|
16
|
-
TekWalletViewRoutes["SEND_INTERNAL"] = "/send/internal";
|
|
17
|
-
TekWalletViewRoutes["SEND_EXTERNAL"] = "/send/external";
|
|
18
|
-
TekWalletViewRoutes["SWAP"] = "/swap";
|
|
19
|
-
TekWalletViewRoutes["ASSET"] = "/";
|
|
20
|
-
TekWalletViewRoutes["NOT_FOUND"] = "/not-found";
|
|
21
|
-
TekWalletViewRoutes["ACTIVITY"] = "/activity";
|
|
22
|
-
TekWalletViewRoutes["SETTING"] = "/setting";
|
|
23
|
-
})(TekWalletViewRoutes || (exports.TekWalletViewRoutes = TekWalletViewRoutes = {}));
|
|
24
|
-
var getView = function (path) {
|
|
25
|
-
if (path.startsWith(TekWalletViewRoutes.SEND_INTERNAL)) {
|
|
26
|
-
return SendInternalView_1.SendInternalView;
|
|
27
|
-
}
|
|
28
|
-
if (path.startsWith(TekWalletViewRoutes.SEND_EXTERNAL)) {
|
|
29
|
-
return SendExternalView_1.default;
|
|
30
|
-
}
|
|
31
|
-
if (path.startsWith(TekWalletViewRoutes.SWAP)) {
|
|
32
|
-
return SwapView_1.SwapView;
|
|
33
|
-
}
|
|
34
|
-
if (path === TekWalletViewRoutes.ASSET) {
|
|
35
|
-
return AssetView_1.default;
|
|
36
|
-
}
|
|
37
|
-
if (path.startsWith(TekWalletViewRoutes.ACTIVITY)) {
|
|
38
|
-
return ActivityView_1.default;
|
|
39
|
-
}
|
|
40
|
-
if (path.startsWith(TekWalletViewRoutes.SETTING)) {
|
|
41
|
-
return SettingView_1.SettingView;
|
|
42
|
-
}
|
|
43
|
-
return NotFoundView_1.default;
|
|
44
|
-
};
|
|
45
|
-
exports.getView = getView;
|