tek-wallet 0.0.754 → 0.0.756

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 (63) hide show
  1. package/README.md +83 -32
  2. package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.d.ts +3 -0
  3. package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.js +7 -7
  4. package/dist/components/TekWallet/components/ui/ActivityDetail/index.js +5 -5
  5. package/dist/components/TekWallet/components/ui/ActivityItem/index.js +9 -4
  6. package/dist/components/TekWallet/components/ui/AmountGroupAndChart/index.js +103 -101
  7. package/dist/components/TekWallet/components/ui/AnalyticGroup/index.d.ts +2 -1
  8. package/dist/components/TekWallet/components/ui/AnalyticGroup/index.js +47 -32
  9. package/dist/components/TekWallet/components/ui/FiatDeposit/index.js +5 -3
  10. package/dist/components/TekWallet/components/ui/HistorySwap/index.js +1 -2
  11. package/dist/components/TekWallet/components/ui/NeonLineChart/index.d.ts +6 -5
  12. package/dist/components/TekWallet/components/ui/NeonLineChart/index.js +2 -2
  13. package/dist/components/TekWallet/components/ui/ReceiveHistory/index.js +1 -2
  14. package/dist/components/TekWallet/components/ui/SmartList/index.d.ts +0 -1
  15. package/dist/components/TekWallet/components/ui/SmartList/index.js +5 -4
  16. package/dist/components/TekWallet/components/ui/SvgPath/index.d.ts +1 -0
  17. package/dist/components/TekWallet/components/ui/SvgPath/index.js +3 -2
  18. package/dist/components/TekWallet/components/ui/SwapToken/index.js +0 -5
  19. package/dist/components/TekWallet/components/ui/SwapToken copy/index.d.ts +32 -0
  20. package/dist/components/TekWallet/components/ui/SwapToken copy/index.js +293 -0
  21. package/dist/components/TekWallet/components/ui/SwiperControlled/index.js +5 -1
  22. package/dist/components/TekWallet/components/ui/TimeFilter/index.d.ts +4 -3
  23. package/dist/components/TekWallet/components/ui/TimeFilter/index.js +27 -30
  24. package/dist/components/TekWallet/components/ui/TokenItem/index.js +11 -6
  25. package/dist/components/TekWallet/components/ui/TokensBoard/index.js +1 -3
  26. package/dist/components/TekWallet/components/views/ActivityView/index.d.ts +10 -0
  27. package/dist/components/TekWallet/components/views/ActivityView/index.js +64 -0
  28. package/dist/components/TekWallet/components/views/AssetView/index.js +69 -6
  29. package/dist/components/TekWallet/components/views/TekWalletView/index.js +1 -1
  30. package/dist/components/TekWallet/components/views/TekWalletView/routes.d.ts +5 -4
  31. package/dist/components/TekWallet/components/views/TekWalletView/routes.js +11 -5
  32. package/dist/components/TekWallet/const/app.config.d.ts +1 -0
  33. package/dist/components/TekWallet/const/app.config.js +4 -0
  34. package/dist/components/TekWallet/index.d.ts +1 -1
  35. package/dist/components/TekWallet/index.js +1 -1
  36. package/dist/components/TekWallet/providers/ActivitiesProvider/const.d.ts +1 -1
  37. package/dist/components/TekWallet/providers/ActivitiesProvider/const.js +1 -1
  38. package/dist/components/TekWallet/providers/ActivitiesProvider/functions/sortActivity.d.ts +3 -0
  39. package/dist/components/TekWallet/providers/ActivitiesProvider/functions/sortActivity.js +8 -0
  40. package/dist/components/TekWallet/providers/ActivitiesProvider/index.js +55 -51
  41. package/dist/components/TekWallet/providers/ActivitiesProvider/type.d.ts +1 -1
  42. package/dist/components/TekWallet/providers/WalletDataProvider/index.js +2 -0
  43. package/dist/components/TekWallet/providers/WalletDataProviderNoImport/index.js +41 -6
  44. package/dist/components/TekWallet/services/axios/get-activities-service/index.js +0 -3
  45. package/dist/components/TekWallet/services/axios/get-activities-service/type.d.ts +4 -4
  46. package/dist/components/TekWallet/services/axios/get-balance-analytic/index.d.ts +3 -0
  47. package/dist/components/TekWallet/services/axios/get-balance-analytic/index.js +56 -0
  48. package/dist/components/TekWallet/services/axios/get-balance-analytic/type.d.ts +18 -0
  49. package/dist/components/TekWallet/services/axios/get-balance-analytic/type.js +2 -0
  50. package/dist/components/TekWallet/store/balance/index.d.ts +15 -0
  51. package/dist/components/TekWallet/store/balance/index.js +24 -0
  52. package/dist/components/TekWallet/store/balance/type.d.ts +9 -0
  53. package/dist/components/TekWallet/store/balance/type.js +2 -0
  54. package/dist/components/TekWallet/store/createStorage.d.ts +3 -0
  55. package/dist/components/TekWallet/store/createStorage.js +17 -0
  56. package/dist/components/TekWallet/store/user/index.d.ts +15 -0
  57. package/dist/components/TekWallet/store/user/index.js +52 -0
  58. package/dist/components/TekWallet/store/user/type.d.ts +38 -0
  59. package/dist/components/TekWallet/store/user/type.js +9 -0
  60. package/dist/components/TekWallet/types/expose-type.d.ts +3 -0
  61. package/package.json +3 -2
  62. package/dist/components/TekWallet/components/ui/Activities/index.d.ts +0 -12
  63. package/dist/components/TekWallet/components/ui/Activities/index.js +0 -117
@@ -19,61 +19,76 @@ var Text_1 = __importDefault(require("../Text"));
19
19
  var Formatter_1 = __importDefault(require("../Formatter"));
20
20
  var material_1 = require("@mui/material");
21
21
  var providers_1 = require("../../../providers");
22
- var ContentHiddenProvider_1 = require("../../../providers/ContentHiddenProvider");
23
22
  var SvgPath_1 = require("../SvgPath");
23
+ var TimeFilter_1 = require("../TimeFilter");
24
+ var user_1 = __importDefault(require("../../../store/user"));
25
+ var balance_1 = __importDefault(require("../../../store/balance"));
24
26
  var AnalyticGroup = function (props) {
27
+ var sx = props.sx;
25
28
  var theme = (0, providers_1.useTheme)();
26
- var _a = (0, ContentHiddenProvider_1.useContentHidden)(), isHidden = _a.isHidden, setIsHidden = _a.setIsHidden;
27
- var toggleHidden = function () {
28
- setIsHidden(!isHidden);
29
- };
30
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g6, position: "relative", bottom: "30px" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
29
+ var isShowBalance = (0, user_1.default)(function (state) { return state.settings.balance.isShowBalance; });
30
+ var toggleShowBalance = (0, user_1.default)(function (state) { return state.toggleShowBalance; });
31
+ var totalBalanceInUSD = (0, balance_1.default)(function (state) { return state.totalBalanceInUSD; });
32
+ var analytic = (0, balance_1.default)(function (state) { return state.analytic; });
33
+ 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: {
31
34
  fontSize: theme.typography.fontSize15,
32
35
  fontWeight: theme.typography.fontWeight500,
33
36
  color: theme.palette.text.accent2,
34
- }, children: "Total Amount" }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { onClick: toggleHidden, sx: { cursor: "pointer", width: 14, height: 14 }, children: SvgPath_1.IC_NO_SEE })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
37
+ }, children: "Total Amount" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { onClick: toggleShowBalance, sx: {
38
+ position: "relative",
39
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 20, height: 20 }, children: SvgPath_1.IC_NO_SEE }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
40
+ position: "absolute",
41
+ left: "50%",
42
+ width: "2px",
43
+ top: "50%",
44
+ height: !isShowBalance ? "80%" : "0px",
45
+ transition: "height 0.2s ease-in-out",
46
+ backgroundColor: theme.palette.text.accent2,
47
+ transform: "translate(calc(-50% + 1px), calc(-50% + 1px)) rotate(45deg)",
48
+ transformOrigin: "center center",
49
+ } })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
35
50
  display: "flex",
36
51
  flexDirection: "column",
37
52
  alignItems: "flex-end",
38
53
  gap: theme.mixins.gaps.g6,
39
54
  fontSize: theme.typography.fontSize12,
40
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign(__assign({}, theme.mixins.row), theme.mixins.value), { fontSize: theme.typography.fontSize20, gap: theme.mixins.gaps.g6 }), children: !isHidden ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: { fontWeight: theme.typography.fontWeight700 }, value: 1000000 }), (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: {
55
+ }, 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 }), (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: {
41
56
  fontWeight: theme.typography.fontWeight400,
42
57
  fontSize: "0.8em",
43
- }, children: "USDC" }), (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: {
58
+ }, children: "USD" }), (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: {
44
59
  fontSize: theme.typography.fontSize24,
45
60
  fontWeight: theme.typography.fontWeight700,
46
61
  color: theme.palette.text.black,
47
- }, children: "*****" })) }), (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: {
48
- fontWeight: theme.typography.fontWeight600,
49
- leading: theme.typography.leading140,
50
- fontSize: theme.typography.fontSize12,
51
- textTransform: "capitalize",
52
- color: theme.palette.text.accent,
53
- }, children: props.timeRange }), !isHidden ? ((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.jsx)(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: "5.63 (+3,22%)" })] })) : ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
54
- fontSize: theme.typography.fontSize12,
62
+ }, children: "******" })) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [!!props.timeRange && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
55
63
  fontWeight: theme.typography.fontWeight600,
56
- color: theme.palette.text.accent2,
57
- display: theme.mixins.row,
58
- }, children: "****" }))] }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
59
- width: "110%",
60
- borderColor: "".concat(theme.palette.border.accent),
61
- opacity: 0.2,
62
- marginTop: theme.mixins.customMargin.m4,
63
- } }), (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: {
64
- fontWeight: theme.typography.fontWeight500,
65
64
  leading: theme.typography.leading140,
66
65
  fontSize: theme.typography.fontSize12,
67
66
  textTransform: "capitalize",
68
67
  color: theme.palette.text.accent,
69
- }, children: "Profit" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.row), children: !isHidden ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
68
+ }, children: TimeFilter_1.TIME_FILTER_LABEL[props.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: {
70
69
  fontSize: theme.typography.fontSize12,
71
70
  fontWeight: theme.typography.fontWeight600,
72
71
  color: theme.palette.text.accent2,
73
- }, children: "\u2248 250k XP" }) })) : ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
74
- fontSize: theme.typography.fontSize12,
75
- fontWeight: theme.typography.fontWeight600,
76
- color: theme.palette.text.accent2,
77
- }, children: "****" })) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 14, height: 14 }, children: SvgPath_1.IC_INFORMATION })] })] })] }));
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: "******" }))] }))] })] }));
78
93
  };
79
94
  exports.default = AnalyticGroup;
@@ -92,7 +92,7 @@ function FiatDeposit(_a) {
92
92
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
93
93
  var children = _a.children;
94
94
  var amountInputRef = (0, react_1.useRef)(null);
95
- var _m = (0, useWallet_1.default)(), masterWallet = _m.masterWallet, transaction = _m.transaction, updateActivities = _m.updateActivities, receiveExternalTokens = _m.receiveExternalTokens, tokens = _m.tokens, pushNotification = _m.pushNotification;
95
+ var _m = (0, useWallet_1.default)(), masterWallet = _m.masterWallet, transaction = _m.transaction, receiveExternalTokens = _m.receiveExternalTokens, tokens = _m.tokens, pushNotification = _m.pushNotification;
96
96
  var _o = (0, react_1.useState)(false), open = _o[0], setOpen = _o[1];
97
97
  var _p = (0, react_1.useState)(false), openQR = _p[0], setOpenQR = _p[1];
98
98
  var _q = (0, react_1.useState)(false), openShare = _q[0], setOpenShare = _q[1];
@@ -177,7 +177,7 @@ function FiatDeposit(_a) {
177
177
  (0, react_1.useEffect)(function () {
178
178
  if ((transaction === null || transaction === void 0 ? void 0 : transaction.transaction_status) === "success" &&
179
179
  (transaction === null || transaction === void 0 ? void 0 : transaction.transaction_type) === type_1.TransactionSlug.DEPOSIT) {
180
- updateActivities();
180
+ // updateActivities();
181
181
  setOpen(false);
182
182
  setOpenQR(false);
183
183
  setOpenShare(false);
@@ -221,7 +221,9 @@ function FiatDeposit(_a) {
221
221
  container: {
222
222
  border: "1px solid ".concat(error ? theme_1.default.palette.error.main : theme_1.default.palette.primary.main),
223
223
  },
224
- }, 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, 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, { loading: loading, disabled: loading || !!error, onClick: handleClick, fullWidth: true, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.button), 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 () {
224
+ }, 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: {
225
+ borderRadius: "999px",
226
+ }, 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, { loading: loading, disabled: loading || !!error, onClick: handleClick, fullWidth: true, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.button), 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 () {
225
227
  setOpen(false);
226
228
  setOpenQR(false);
227
229
  setInputAmount("");
@@ -183,8 +183,7 @@ var HistorySwap = function (props) {
183
183
  transaction_status: transactionStatus,
184
184
  from_date: fromDate,
185
185
  to_date: toDate,
186
- page: 1,
187
- take: 10,
186
+ limit: 10,
188
187
  })];
189
188
  case 2:
190
189
  response = _b.sent();
@@ -1,12 +1,13 @@
1
1
  import { GeneralProps } from "../../../types/ui";
2
+ export type SeriesType = Array<{
3
+ name: string;
4
+ data: number[];
5
+ }>;
2
6
  export interface NeonLineChartPropsTypes extends GeneralProps {
3
7
  categories?: string[];
4
- series?: Array<{
5
- name: string;
6
- data: any[];
7
- }>;
8
+ series?: SeriesType;
8
9
  showMinMaxValues?: boolean;
9
10
  }
10
- declare function NeonLineChart({ series, categories, showMinMaxValues, sx, }: NeonLineChartPropsTypes): import("react/jsx-runtime").JSX.Element;
11
+ declare function NeonLineChart({ series, categories, showMinMaxValues, children, sx, }: NeonLineChartPropsTypes): import("react/jsx-runtime").JSX.Element;
11
12
  declare const _default: import("react").MemoExoticComponent<typeof NeonLineChart>;
12
13
  export default _default;
@@ -27,7 +27,7 @@ var ThemeProvider_1 = require("../../../providers/ThemeProvider");
27
27
  var formatDate_1 = __importDefault(require("../../../utils/formatDate"));
28
28
  function NeonLineChart(_a) {
29
29
  var _b, _c, _d, _e;
30
- var series = _a.series, categories = _a.categories, _f = _a.showMinMaxValues, showMinMaxValues = _f === void 0 ? false : _f, sx = _a.sx;
30
+ var series = _a.series, categories = _a.categories, _f = _a.showMinMaxValues, showMinMaxValues = _f === void 0 ? false : _f, children = _a.children, sx = _a.sx;
31
31
  var chartComponentRef = (0, react_1.useRef)(null);
32
32
  var formatValue = (0, useFormatter_1.default)().formatValue;
33
33
  var theme = (0, ThemeProvider_1.useTheme)();
@@ -175,6 +175,6 @@ function NeonLineChart(_a) {
175
175
  duration: 0.4,
176
176
  ease: "easeInOut",
177
177
  delay: 0.4,
178
- }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: minValue }) }) })] })), (0, jsx_runtime_1.jsx)(highcharts_react_official_1.default, { highcharts: highcharts_1.default, options: options, ref: chartComponentRef })] }));
178
+ }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: minValue }) }) })] })), (0, jsx_runtime_1.jsx)(highcharts_react_official_1.default, { highcharts: highcharts_1.default, options: options, ref: chartComponentRef }), children] }));
179
179
  }
180
180
  exports.default = (0, react_1.memo)(NeonLineChart);
@@ -185,8 +185,7 @@ var ReceiveHistory = function (props) {
185
185
  transaction_status: transactionStatus,
186
186
  from_date: fromDate,
187
187
  to_date: toDate,
188
- page: 1,
189
- take: 10,
188
+ limit: 10,
190
189
  })];
191
190
  case 2:
192
191
  response = _b.sent();
@@ -1,6 +1,5 @@
1
1
  import { BoxProps } from "@mui/material";
2
2
  interface SmartListProps extends BoxProps {
3
- items: any[];
4
3
  children: React.ReactNode;
5
4
  loadMoreData: () => void;
6
5
  hasMore: boolean;
@@ -12,13 +12,12 @@ var __assign = (this && this.__assign) || function () {
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  var jsx_runtime_1 = require("react/jsx-runtime");
15
- /* eslint-disable @typescript-eslint/no-explicit-any */
16
15
  //This component is used to render a list of items but not use react query because some reasons
17
16
  var material_1 = require("@mui/material");
18
17
  var ThemeProvider_1 = require("../../../providers/ThemeProvider");
19
18
  var react_1 = require("react");
20
19
  var SmartList = function (props) {
21
- var items = props.items, children = props.children, loadMoreData = props.loadMoreData, hasMore = props.hasMore, loadingComponent = props.loadingComponent, loadingComponentProps = props.loadingComponentProps;
20
+ var children = props.children, loadMoreData = props.loadMoreData, hasMore = props.hasMore, loadingComponent = props.loadingComponent, loadingComponentProps = props.loadingComponentProps;
22
21
  var theme = (0, ThemeProvider_1.useTheme)();
23
22
  var containerRef = (0, react_1.useRef)(null);
24
23
  var loadingRef = (0, react_1.useRef)(null);
@@ -26,6 +25,8 @@ var SmartList = function (props) {
26
25
  function handleIntersection(entries) {
27
26
  entries.forEach(function (entry) {
28
27
  if (entry.isIntersecting) {
28
+ if (!hasMore)
29
+ return;
29
30
  loadMoreData();
30
31
  }
31
32
  else {
@@ -44,7 +45,7 @@ var SmartList = function (props) {
44
45
  return function () {
45
46
  observer.disconnect();
46
47
  };
47
- }, [items === null || items === void 0 ? void 0 : items.length]);
48
- return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ overflowY: "auto", width: "100%", height: "100%" }, props.sx), ref: containerRef, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { height: "fit-content", my: "auto" }), children: [children, hasMore && ((0, jsx_runtime_1.jsx)(material_1.Box, { ref: loadingRef, sx: __assign({ width: "100%" }, loadingComponentProps), children: loadingComponent }))] }) }));
48
+ }, [loadMoreData, hasMore]);
49
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ overflowY: "auto", width: "100%", height: "100%" }, props.sx), ref: containerRef, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { height: "fit-content", my: "auto", gap: 0 }), children: [children, (0, jsx_runtime_1.jsx)("div", { ref: loadingRef }), hasMore && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ width: "100%" }, loadingComponentProps), children: loadingComponent }))] }) }));
49
50
  };
50
51
  exports.default = SmartList;
@@ -47,3 +47,4 @@ export declare const IC_RECEIVE: import("react/jsx-runtime").JSX.Element;
47
47
  export declare const IC_WITHDRAW_FC: import("react/jsx-runtime").JSX.Element;
48
48
  export declare const IC_TRANSFER: import("react/jsx-runtime").JSX.Element;
49
49
  export declare const IC_SWAP_FC: import("react/jsx-runtime").JSX.Element;
50
+ export declare const IC_ARROW_RIGHT: import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IC_SWAP_FC = exports.IC_TRANSFER = exports.IC_WITHDRAW_FC = exports.IC_RECEIVE = exports.IC_SWAP_BG = exports.IC_PROCESSING_CIRCLE = exports.IC_NETWORK = exports.IC_ERROR_CIRCLE = exports.IC_CHECK_CIRCLE = exports.IC_SCAN_QR_CODE = exports.IC_DEPOSIT = exports.IC_WITHDRAW = exports.IC_INFORMATION = exports.IC_EXPANDER_ARROW = exports.IC_NO_SEE = exports.IC_SET = exports.IC_EDIT = exports.IC_RECEIVE_TAG_RECOMMENDED = exports.IC_RECEIVE_TAG = exports.IC_TOOLTIP = exports.IC_BACK = exports.IC_UNCHECK = exports.IC_CHECK = exports.IC_ARROW_DROP_DOWN = exports.IC_ARROW_DROP_UP = exports.IC_RECEIVE_EXTERNAL = exports.IC_RECEIVE_INTERNAL = exports.IC_ERROR = exports.IC_SUCCESS = exports.IC_CHEVRON_RIGHT = exports.IC_CHEVRON_LEFT = exports.IC_TRASH = exports.IC_ARROW_BLACK_DROP = exports.IC_SWAP_SECONDARY = exports.IC_SWAP = exports.IC_HELP = exports.IC_PASSCODE = exports.IC_FACE_ID = exports.IC_COPY = exports.IC_TIMELINE_DOT = exports.IC_CLOSE = exports.IC_SEARCH = exports.IC_DOCUMENTS = exports.IC_SCAN = exports.IC_TUTORIAL = exports.IC_HISTORY = exports.ARROW_DOWN = exports.ARROW_DROP_DOWN = exports.ARROW_DROP_UP = void 0;
3
+ exports.IC_ARROW_RIGHT = exports.IC_SWAP_FC = exports.IC_TRANSFER = exports.IC_WITHDRAW_FC = exports.IC_RECEIVE = exports.IC_SWAP_BG = exports.IC_PROCESSING_CIRCLE = exports.IC_NETWORK = exports.IC_ERROR_CIRCLE = exports.IC_CHECK_CIRCLE = exports.IC_SCAN_QR_CODE = exports.IC_DEPOSIT = exports.IC_WITHDRAW = exports.IC_INFORMATION = exports.IC_EXPANDER_ARROW = exports.IC_NO_SEE = exports.IC_SET = exports.IC_EDIT = exports.IC_RECEIVE_TAG_RECOMMENDED = exports.IC_RECEIVE_TAG = exports.IC_TOOLTIP = exports.IC_BACK = exports.IC_UNCHECK = exports.IC_CHECK = exports.IC_ARROW_DROP_DOWN = exports.IC_ARROW_DROP_UP = exports.IC_RECEIVE_EXTERNAL = exports.IC_RECEIVE_INTERNAL = exports.IC_ERROR = exports.IC_SUCCESS = exports.IC_CHEVRON_RIGHT = exports.IC_CHEVRON_LEFT = exports.IC_TRASH = exports.IC_ARROW_BLACK_DROP = exports.IC_SWAP_SECONDARY = exports.IC_SWAP = exports.IC_HELP = exports.IC_PASSCODE = exports.IC_FACE_ID = exports.IC_COPY = exports.IC_TIMELINE_DOT = exports.IC_CLOSE = exports.IC_SEARCH = exports.IC_DOCUMENTS = exports.IC_SCAN = exports.IC_TUTORIAL = exports.IC_HISTORY = exports.ARROW_DOWN = exports.ARROW_DROP_DOWN = exports.ARROW_DROP_UP = void 0;
4
4
  var jsx_runtime_1 = require("react/jsx-runtime");
5
5
  exports.ARROW_DROP_UP = ((0, jsx_runtime_1.jsx)("svg", { width: "8", height: "5", viewBox: "0 0 8 5", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M0 4.5L4 0.5L8 4.5H0Z", fill: "#000" }) }));
6
6
  exports.ARROW_DROP_DOWN = ((0, jsx_runtime_1.jsx)("svg", { width: "8", height: "5", viewBox: "0 0 8 5", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M8 0.5L4 4.5L0 0.5L8 0.5Z", fill: "#000" }) }));
@@ -36,7 +36,7 @@ exports.IC_RECEIVE_TAG = ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3
36
36
  exports.IC_RECEIVE_TAG_RECOMMENDED = ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "95", height: "34", viewBox: "0 0 95 34", fill: "none", children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 22C0 13.7157 6.71573 7 15 7H88V19C88 23.4183 84.4183 27 80 27H0V22Z", fill: "#1EA031" }), (0, jsx_runtime_1.jsx)("path", { d: "M0 27H7C2.61253 28.3759 1.16529 29.9732 0 34V27Z", fill: "#1EA031" }), (0, jsx_runtime_1.jsx)("path", { opacity: "0.01", d: "M68 0H75C70.6125 1.37594 69.1653 2.97319 68 7V0Z", fill: "#1EA031" }), (0, jsx_runtime_1.jsx)("path", { d: "M88 7H95C90.6125 8.37594 89.1653 9.97319 88 14V7Z", fill: "#1EA031" })] }));
37
37
  exports.IC_EDIT = ((0, jsx_runtime_1.jsxs)("svg", { width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("mask", { id: "mask0_4608_8535", style: { maskType: "alpha" }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "17", height: "16", children: (0, jsx_runtime_1.jsx)("rect", { x: "0.5", width: "16", height: "16", fill: "#D9D9D9" }) }), (0, jsx_runtime_1.jsx)("g", { mask: "url(#mask0_4608_8535)", children: (0, jsx_runtime_1.jsx)("path", { d: "M4.10039 13.6008C3.77039 13.6008 3.48789 13.4833 3.25289 13.2483C3.01789 13.0133 2.90039 12.7308 2.90039 12.4008V3.60078C2.90039 3.26623 3.01706 2.97978 3.25039 2.74145C3.48372 2.50323 3.76706 2.38967 4.10039 2.40078H9.86706L8.66706 3.60078H4.10039V12.4008H12.9004V7.83412L14.1004 6.63411V12.4008C14.1004 12.7308 13.9829 13.0133 13.7479 13.2483C13.5129 13.4833 13.2304 13.6008 12.9004 13.6008H4.10039ZM6.90039 9.60078V7.05078L12.8004 1.15078C12.9226 1.02856 13.0559 0.93967 13.2004 0.884115C13.3448 0.828559 13.4921 0.800781 13.6421 0.800781C13.8021 0.800781 13.9546 0.828559 14.0996 0.884115C14.2446 0.93967 14.3778 1.02734 14.4994 1.14712L15.3504 2.00078C15.4726 2.123 15.5615 2.25734 15.6171 2.40378C15.6726 2.55023 15.7004 2.69923 15.7004 2.85078C15.7004 3.00256 15.6725 3.15184 15.6167 3.29861C15.5609 3.44528 15.4722 3.57934 15.3504 3.70078L9.45039 9.60078H6.90039ZM8.10039 8.40078H8.95039L12.8004 4.55078L12.3837 4.11745L11.9504 3.70078L8.10039 7.55078V8.40078Z", fill: "#1C461D" }) })] }));
38
38
  exports.IC_SET = ((0, jsx_runtime_1.jsxs)("svg", { width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("mask", { id: "mask0_4608_8545", style: { maskType: "alpha" }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "17", height: "16", children: (0, jsx_runtime_1.jsx)("rect", { x: "0.5", width: "16", height: "16", fill: "#D9D9D9" }) }), (0, jsx_runtime_1.jsx)("g", { mask: "url(#mask0_4608_8545)", children: (0, jsx_runtime_1.jsx)("path", { d: "M7.70039 11.2004H9.30039V8.80039H11.7004V7.20039H9.30039V4.80039H7.70039V7.20039H5.30039V8.80039H7.70039V11.2004ZM4.10039 13.6004C3.77039 13.6004 3.48789 13.4829 3.25289 13.2479C3.01789 13.0129 2.90039 12.7304 2.90039 12.4004V3.60039C2.90039 3.27039 3.01789 2.98789 3.25289 2.75289C3.48789 2.51789 3.77039 2.40039 4.10039 2.40039H12.9004C13.2304 2.40039 13.5129 2.51789 13.7479 2.75289C13.9829 2.98789 14.1004 3.27039 14.1004 3.60039V12.4004C14.1004 12.7304 13.9829 13.0129 13.7479 13.2479C13.5129 13.4829 13.2304 13.6004 12.9004 13.6004H4.10039ZM4.10039 12.4004H12.9004V3.60039H4.10039V12.4004Z", fill: "#1C461D" }) })] }));
39
- exports.IC_NO_SEE = ((0, jsx_runtime_1.jsx)("svg", { width: "15", height: "14", viewBox: "0 0 15 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M2.32125 4.482C1.7171 5.21812 1.26723 6.07547 1 7C1.83434 9.892 4.42904 12 7.50032 12C8.14157 12 8.76151 11.908 9.34916 11.7367M3.77294 3.152C4.87891 2.39857 6.17526 1.99792 7.50032 2C10.5716 2 13.1657 4.108 14 6.99867C13.5428 8.57823 12.5612 9.94107 11.2277 10.848M3.77294 3.152L1.68839 1M3.77294 3.152L6.13 5.58533M11.2277 10.848L13.3123 13M11.2277 10.848L8.87065 8.41467C9.05056 8.22893 9.19327 8.00844 9.29064 7.76577C9.38801 7.52309 9.43812 7.263 9.43812 7.00033C9.43812 6.73767 9.38801 6.47757 9.29064 6.2349C9.19327 5.99223 9.05056 5.77173 8.87065 5.586C8.69074 5.40027 8.47715 5.25294 8.24208 5.15242C8.00702 5.0519 7.75508 5.00016 7.50065 5.00016C7.24621 5.00016 6.99427 5.0519 6.75921 5.15242C6.52414 5.25294 6.31056 5.40027 6.13064 5.586M8.87 8.414L6.13129 5.58667", stroke: "#6B7271", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
39
+ exports.IC_NO_SEE = ((0, jsx_runtime_1.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M7.99998 5.16675C6.43333 5.16675 5.16665 6.43344 5.16665 8.00008C5.16665 9.56673 6.43333 10.8334 7.99998 10.8334C9.56663 10.8334 10.8333 9.56673 10.8333 8.00008C10.8333 6.43344 9.56663 5.16675 7.99998 5.16675ZM6.16665 8.00008C6.16665 6.98572 6.98562 6.16675 7.99998 6.16675C9.01434 6.16675 9.83331 6.98572 9.83331 8.00008C9.83331 9.01444 9.01434 9.83341 7.99998 9.83341C6.98562 9.83341 6.16665 9.01444 6.16665 8.00008Z", fill: "#6B7271" }), (0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M15.0284 7.20488C12.6159 0.487371 3.38407 0.487372 0.971573 7.20488C0.787226 7.71819 0.787226 8.28197 0.971573 8.79528C3.38407 15.5128 12.6159 15.5128 15.0284 8.79528C15.2127 8.28197 15.2127 7.71819 15.0284 7.20488ZM1.91272 7.54288C4.00822 1.70804 11.9917 1.70804 14.0872 7.54288C14.1931 7.83769 14.1931 8.16248 14.0872 8.45728C11.9917 14.2921 4.00822 14.2921 1.91272 8.45728C1.80684 8.16248 1.80684 7.83768 1.91272 7.54288Z", fill: "#6B7271" })] }));
40
40
  exports.IC_EXPANDER_ARROW = ((0, jsx_runtime_1.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("rect", { x: "0.5", y: "0.5", width: "15", height: "15", rx: "7.5", fill: "#ECF4E9" }), (0, jsx_runtime_1.jsx)("rect", { x: "0.5", y: "0.5", width: "15", height: "15", rx: "7.5", stroke: "#1C461D" }), (0, jsx_runtime_1.jsx)("path", { d: "M4 4V6.18182M4 4H6.18182M4 4L6.54545 6.54545M4 12V9.81818M4 12H6.18182M4 12L6.54545 9.45455M12 4H9.81818M12 4V6.18182M12 4L9.45455 6.54545M12 12H9.81818M12 12V9.81818M12 12L9.45455 9.45455", stroke: "#1C461D", strokeLinecap: "round", strokeLinejoin: "round" })] }));
41
41
  exports.IC_INFORMATION = ((0, jsx_runtime_1.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M7 5V7.5M13 7C13 7.78793 12.8448 8.56815 12.5433 9.2961C12.2417 10.0241 11.7998 10.6855 11.2426 11.2426C10.6855 11.7998 10.0241 12.2417 9.2961 12.5433C8.56815 12.8448 7.78793 13 7 13C6.21207 13 5.43185 12.8448 4.7039 12.5433C3.97595 12.2417 3.31451 11.7998 2.75736 11.2426C2.20021 10.6855 1.75825 10.0241 1.45672 9.2961C1.15519 8.56815 1 7.78793 1 7C1 5.4087 1.63214 3.88258 2.75736 2.75736C3.88258 1.63214 5.4087 1 7 1C8.5913 1 10.1174 1.63214 11.2426 2.75736C12.3679 3.88258 13 5.4087 13 7ZM7 9.5H7.00533V9.50533H7V9.5Z", stroke: "#1C461D", strokeLinecap: "round", strokeLinejoin: "round" }) }));
42
42
  exports.IC_WITHDRAW = ((0, jsx_runtime_1.jsxs)("svg", { width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.625 3.75C8.06865 3.75 4.375 7.44365 4.375 12C4.375 16.5563 8.06865 20.25 12.625 20.25C17.1813 20.25 20.875 16.5563 20.875 12V10.5006C20.875 10.0863 21.2108 9.75 21.625 9.75C22.0392 9.75 22.375 10.0858 22.375 10.5V12C22.375 17.3848 18.0098 21.75 12.625 21.75C7.24022 21.75 2.875 17.3848 2.875 12C2.875 6.61522 7.24022 2.25 12.625 2.25L14.1243 2.25L14.125 3.75L12.625 3.75ZM14.875 3C14.875 3.41422 14.5392 3.75 14.125 3.75L14.1243 2.25C14.5385 2.25 14.875 2.58579 14.875 3Z", fill: "#1C461D" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.875 3.75C17.4608 3.75 17.125 3.41421 17.125 3C17.125 2.58579 17.4608 2.25 17.875 2.25H21.625C22.0392 2.25 22.375 2.58579 22.375 3V6.75C22.375 7.16421 22.0392 7.5 21.625 7.5C21.2108 7.5 20.875 7.16421 20.875 6.75V4.81066L18.4053 7.28033C18.1124 7.57322 17.6376 7.57322 17.3447 7.28033C17.0518 6.98744 17.0518 6.51256 17.3447 6.21967L19.8143 3.75H17.875Z", fill: "#1C461D" }), (0, jsx_runtime_1.jsx)("path", { d: "M12.625 6C13.0392 6 13.375 6.33579 13.375 6.75V7.5H14.875C15.2892 7.5 15.625 7.83579 15.625 8.25C15.625 8.66421 15.2892 9 14.875 9H11.5C11.2016 9 10.9155 9.11853 10.7045 9.3295C10.4935 9.54048 10.375 9.82663 10.375 10.125C10.375 10.4234 10.4935 10.7095 10.7045 10.9205C10.9155 11.1315 11.2016 11.25 11.5 11.25H13.75C14.4462 11.25 15.1139 11.5266 15.6062 12.0188C16.0984 12.5111 16.375 13.1788 16.375 13.875C16.375 14.5712 16.0984 15.2389 15.6062 15.7312C15.1139 16.2234 14.4462 16.5 13.75 16.5H13.375V17.25C13.375 17.6642 13.0392 18 12.625 18C12.2108 18 11.875 17.6642 11.875 17.25V16.5H10.375C9.96079 16.5 9.625 16.1642 9.625 15.75C9.625 15.3358 9.96079 15 10.375 15H13.75C14.0484 15 14.3345 14.8815 14.5455 14.6705C14.7565 14.4595 14.875 14.1734 14.875 13.875C14.875 13.5766 14.7565 13.2905 14.5455 13.0795C14.3345 12.8685 14.0484 12.75 13.75 12.75H11.5C10.8038 12.75 10.1361 12.4734 9.64384 11.9812C9.15156 11.4889 8.875 10.8212 8.875 10.125C8.875 9.42881 9.15156 8.76113 9.64384 8.26884C10.1361 7.77656 10.8038 7.5 11.5 7.5H11.875V6.75C11.875 6.33579 12.2108 6 12.625 6Z", fill: "#1C461D" })] }));
@@ -51,3 +51,4 @@ exports.IC_RECEIVE = ((0, jsx_runtime_1.jsxs)("svg", { width: "25", height: "24"
51
51
  exports.IC_WITHDRAW_FC = ((0, jsx_runtime_1.jsx)("svg", { width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M21.375 4.5H3.375C2.97718 4.5 2.59564 4.65804 2.31434 4.93934C2.03304 5.22064 1.875 5.60218 1.875 6V18C1.875 18.3978 2.03304 18.7794 2.31434 19.0607C2.59564 19.342 2.97718 19.5 3.375 19.5H21.375C21.7728 19.5 22.1544 19.342 22.4357 19.0607C22.717 18.7794 22.875 18.3978 22.875 18V6C22.875 5.60218 22.717 5.22064 22.4357 4.93934C22.1544 4.65804 21.7728 4.5 21.375 4.5ZM21.375 6V8.25H3.375V6H21.375ZM21.375 18H3.375V9.75H21.375V18ZM19.875 15.75C19.875 15.9489 19.796 16.1397 19.6553 16.2803C19.5147 16.421 19.3239 16.5 19.125 16.5H16.125C15.9261 16.5 15.7353 16.421 15.5947 16.2803C15.454 16.1397 15.375 15.9489 15.375 15.75C15.375 15.5511 15.454 15.3603 15.5947 15.2197C15.7353 15.079 15.9261 15 16.125 15H19.125C19.3239 15 19.5147 15.079 19.6553 15.2197C19.796 15.3603 19.875 15.5511 19.875 15.75ZM13.875 15.75C13.875 15.9489 13.796 16.1397 13.6553 16.2803C13.5147 16.421 13.3239 16.5 13.125 16.5H11.625C11.4261 16.5 11.2353 16.421 11.0947 16.2803C10.954 16.1397 10.875 15.9489 10.875 15.75C10.875 15.5511 10.954 15.3603 11.0947 15.2197C11.2353 15.079 11.4261 15 11.625 15H13.125C13.3239 15 13.5147 15.079 13.6553 15.2197C13.796 15.3603 13.875 15.5511 13.875 15.75Z", fill: "#1C461D" }) }));
52
52
  exports.IC_TRANSFER = ((0, jsx_runtime_1.jsxs)("svg", { width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M12.625 3.75C8.06865 3.75 4.375 7.44365 4.375 12C4.375 16.5563 8.06865 20.25 12.625 20.25C17.1813 20.25 20.875 16.5563 20.875 12V10.5006C20.875 10.0863 21.2108 9.75 21.625 9.75C22.0392 9.75 22.375 10.0858 22.375 10.5V12C22.375 17.3848 18.0098 21.75 12.625 21.75C7.24022 21.75 2.875 17.3848 2.875 12C2.875 6.61522 7.24022 2.25 12.625 2.25L14.1243 2.25L14.125 3.75L12.625 3.75ZM14.875 3C14.875 3.41422 14.5392 3.75 14.125 3.75L14.1243 2.25C14.5385 2.25 14.875 2.58579 14.875 3Z", fill: "#1C461D" }), (0, jsx_runtime_1.jsx)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M17.875 3.75C17.4608 3.75 17.125 3.41421 17.125 3C17.125 2.58579 17.4608 2.25 17.875 2.25H21.625C22.0392 2.25 22.375 2.58579 22.375 3V6.75C22.375 7.16421 22.0392 7.5 21.625 7.5C21.2108 7.5 20.875 7.16421 20.875 6.75V4.81066L18.4053 7.28033C18.1124 7.57322 17.6376 7.57322 17.3447 7.28033C17.0518 6.98744 17.0518 6.51256 17.3447 6.21967L19.8143 3.75H17.875Z", fill: "#1C461D" }), (0, jsx_runtime_1.jsx)("path", { d: "M12.625 6C13.0392 6 13.375 6.33579 13.375 6.75V7.5H14.875C15.2892 7.5 15.625 7.83579 15.625 8.25C15.625 8.66421 15.2892 9 14.875 9H11.5C11.2016 9 10.9155 9.11853 10.7045 9.3295C10.4935 9.54048 10.375 9.82663 10.375 10.125C10.375 10.4234 10.4935 10.7095 10.7045 10.9205C10.9155 11.1315 11.2016 11.25 11.5 11.25H13.75C14.4462 11.25 15.1139 11.5266 15.6062 12.0188C16.0984 12.5111 16.375 13.1788 16.375 13.875C16.375 14.5712 16.0984 15.2389 15.6062 15.7312C15.1139 16.2234 14.4462 16.5 13.75 16.5H13.375V17.25C13.375 17.6642 13.0392 18 12.625 18C12.2108 18 11.875 17.6642 11.875 17.25V16.5H10.375C9.96079 16.5 9.625 16.1642 9.625 15.75C9.625 15.3358 9.96079 15 10.375 15H13.75C14.0484 15 14.3345 14.8815 14.5455 14.6705C14.7565 14.4595 14.875 14.1734 14.875 13.875C14.875 13.5766 14.7565 13.2905 14.5455 13.0795C14.3345 12.8685 14.0484 12.75 13.75 12.75H11.5C10.8038 12.75 10.1361 12.4734 9.64384 11.9812C9.15156 11.4889 8.875 10.8212 8.875 10.125C8.875 9.42881 9.15156 8.76113 9.64384 8.26884C10.1361 7.77656 10.8038 7.5 11.5 7.5H11.875V6.75C11.875 6.33579 12.2108 6 12.625 6Z", fill: "#1C461D" })] }));
53
53
  exports.IC_SWAP_FC = ((0, jsx_runtime_1.jsx)("svg", { width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M7.625 21L3.125 16.5M3.125 16.5L7.625 12M3.125 16.5H16.625M16.625 3L21.125 7.5M21.125 7.5L16.625 12M21.125 7.5H7.625", stroke: "#1C461D", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
54
+ exports.IC_ARROW_RIGHT = ((0, jsx_runtime_1.jsx)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M9 18L15 12L9 6", stroke: "#121212", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
@@ -126,7 +126,6 @@ exports.SwapToken = (0, react_1.forwardRef)(function (props, ref) {
126
126
  var _e = (0, react_1.useState)(Button_1.BUTTON_STATUS.ENABLED), buttonStatus = _e[0], setButtonStatus = _e[1];
127
127
  var _f = (0, react_1.useState)(props.initFeeData), estimateFee = _f[0], setEstimateFee = _f[1];
128
128
  var _g = (0, react_1.useState)(false), isLoadingEstimateFee = _g[0], setIsLoadingEstimateFee = _g[1];
129
- var activitiesRef = (0, react_1.useRef)(null);
130
129
  var amount = props.sendData.amount;
131
130
  var fromTokenSlug = props.sendData.currency_slug;
132
131
  var toTokenSlug = props.sendData.to_currency_slug;
@@ -220,10 +219,6 @@ exports.SwapToken = (0, react_1.forwardRef)(function (props, ref) {
220
219
  (_b = confirmLayoutDrawerRef.current) === null || _b === void 0 ? void 0 : _b.close();
221
220
  setButtonStatus(Button_1.BUTTON_STATUS.ENABLED);
222
221
  (_c = props.onSuccess) === null || _c === void 0 ? void 0 : _c.call(props, response);
223
- setTimeout(function () {
224
- var _a;
225
- (_a = activitiesRef.current) === null || _a === void 0 ? void 0 : _a.openTab(0);
226
- }, 200);
227
222
  }
228
223
  else {
229
224
  throw new Error("Swap internal failed");
@@ -0,0 +1,32 @@
1
+ import { SxProps } from "@mui/material";
2
+ import { ConfirmLayoutProps } from "../ConfirmLayout";
3
+ import { FeesDataType } from "../../../services/axios/get-est-fee-service/type";
4
+ import { SwapBody, SwapResponse } from "../../../services/axios/swap-service/type";
5
+ export interface SwapDataType extends Omit<SwapBody, "passcode" | "network"> {
6
+ }
7
+ interface SwapTokenProps extends Omit<ConfirmLayoutProps, "action"> {
8
+ sendData: SwapDataType;
9
+ onSuccess?: (data: SwapResponse) => any;
10
+ initFeeData?: FeesDataType;
11
+ onStart?: () => void;
12
+ onFinish?: () => void;
13
+ onError?: (error: Error | unknown) => void;
14
+ sx?: SxProps;
15
+ btnConfirm?: React.ReactNode;
16
+ children?: React.ReactNode;
17
+ trigger?: React.ReactNode;
18
+ overrideHeader?: React.ReactNode;
19
+ }
20
+ export interface SwapTokenRef {
21
+ open: () => void;
22
+ close: () => void;
23
+ }
24
+ export declare enum SwapTokenError {
25
+ TOKEN_NOT_FOUND = "Token not found",
26
+ NOT_ENOUGH_BALANCE = "Not enough balance",
27
+ MAX_AMOUNT = "Max amount",
28
+ MIN_AMOUNT = "Min amount",
29
+ FAILED = "Failed"
30
+ }
31
+ export declare const SwapToken: import("react").ForwardRefExoticComponent<Omit<SwapTokenProps, "ref"> & import("react").RefAttributes<SwapTokenRef>>;
32
+ export default SwapToken;