tek-wallet 0.0.636 → 0.0.638
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/CardFrom/index.d.ts +10 -0
- package/dist/components/TekWallet/components/ui/CardFrom/index.js +90 -0
- package/dist/components/TekWallet/components/ui/CardTo/index.d.ts +10 -0
- package/dist/components/TekWallet/components/ui/CardTo/index.js +39 -0
- package/dist/components/TekWallet/components/ui/CardToken/index.d.ts +11 -0
- package/dist/components/TekWallet/components/ui/CardToken/index.js +37 -0
- package/dist/components/TekWallet/components/ui/DetailSwap/index.d.ts +7 -0
- package/dist/components/TekWallet/components/ui/DetailSwap/index.js +51 -0
- package/dist/components/TekWallet/components/ui/DetailSwapResult/index.d.ts +8 -0
- package/dist/components/TekWallet/components/ui/DetailSwapResult/index.js +122 -0
- package/dist/components/TekWallet/components/ui/DrawerDrag/index.d.ts +21 -0
- package/dist/components/TekWallet/components/ui/DrawerDrag/index.js +25 -0
- package/dist/components/TekWallet/components/ui/Fees/index.js +3 -3
- package/dist/components/TekWallet/components/ui/ModalSelectToken/index.d.ts +9 -0
- package/dist/components/TekWallet/components/ui/ModalSelectToken/index.js +127 -0
- package/dist/components/TekWallet/components/ui/SwapFunction/index.d.ts +11 -0
- package/dist/components/TekWallet/components/ui/SwapFunction/index.js +195 -0
- package/dist/components/TekWallet/components/ui/SwapToken/index.d.ts +1 -0
- package/dist/components/TekWallet/components/ui/SwapToken/index.js +29 -9
- package/dist/components/TekWallet/components/ui/TransferInternal/components/transferAmount.d.ts +0 -8
- package/dist/components/TekWallet/components/ui/TransferInternal/components/transferAmount.js +57 -36
- package/dist/components/TekWallet/components/ui/TransferInternal/components/transferInfo.d.ts +0 -11
- package/dist/components/TekWallet/components/ui/TransferInternal/components/transferInfo.js +151 -80
- package/dist/components/TekWallet/components/ui/TransferInternal/components/transferTarget.d.ts +0 -6
- package/dist/components/TekWallet/components/ui/TransferInternal/components/transferTarget.js +64 -38
- package/dist/components/TekWallet/components/ui/TransferInternal/index.d.ts +2 -4
- package/dist/components/TekWallet/components/ui/TransferInternal/index.js +6 -42
- package/dist/components/TekWallet/components/ui/UserInfo/index.js +3 -4
- package/dist/components/TekWallet/components/views/AssetView/index.js +8 -5
- package/dist/components/TekWallet/components/views/HelpView/index.d.ts +2 -0
- package/dist/components/TekWallet/components/views/HelpView/index.js +7 -0
- package/dist/components/TekWallet/hooks/useBoolean.d.ts +9 -0
- package/dist/components/TekWallet/hooks/useBoolean.js +33 -0
- package/dist/components/TekWallet/services/axios/get-swap-tokens-list-service/type.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SupportedToken } from "../../../services/axios/get-swap-tokens-list-service/type";
|
|
3
|
+
interface Props {
|
|
4
|
+
className?: string;
|
|
5
|
+
selectedToken?: SupportedToken;
|
|
6
|
+
number?: number;
|
|
7
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const CardForm: ({ selectedToken, onChange, number }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default CardForm;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
var material_1 = require("@mui/material");
|
|
8
|
+
var react_1 = require("react");
|
|
9
|
+
var Icon_1 = __importDefault(require("../Icon"));
|
|
10
|
+
var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
|
|
11
|
+
var providers_1 = require("../../../providers");
|
|
12
|
+
var useWallet_1 = __importDefault(require("../../../hooks/useWallet"));
|
|
13
|
+
var useBoolean_1 = require("../../../hooks/useBoolean");
|
|
14
|
+
var Button_1 = __importDefault(require("../Button"));
|
|
15
|
+
var Text_1 = __importDefault(require("../Text"));
|
|
16
|
+
var getStandardNumber_1 = __importDefault(require("../../../utils/getStandardNumber"));
|
|
17
|
+
var CardForm = function (_a) {
|
|
18
|
+
var _b, _c, _d, _e, _f, _g;
|
|
19
|
+
var selectedToken = _a.selectedToken, onChange = _a.onChange, number = _a.number;
|
|
20
|
+
var selectTokenForm = (0, useBoolean_1.useBoolean)("selectTokenForm");
|
|
21
|
+
var _h = (0, useWallet_1.default)(), updateSwapTokens = _h.updateSwapTokens, fromTokens = _h.fromTokens;
|
|
22
|
+
var theme = (0, providers_1.useTheme)();
|
|
23
|
+
(0, react_1.useEffect)(function () {
|
|
24
|
+
if (!fromTokens) {
|
|
25
|
+
updateSwapTokens();
|
|
26
|
+
}
|
|
27
|
+
}, [fromTokens, updateSwapTokens]);
|
|
28
|
+
var displayToken = (0, react_1.useMemo)(function () {
|
|
29
|
+
return selectedToken;
|
|
30
|
+
}, [selectedToken]);
|
|
31
|
+
var handleClickGetMaxValue = function () {
|
|
32
|
+
if ((displayToken === null || displayToken === void 0 ? void 0 : displayToken.max_value) && onChange) {
|
|
33
|
+
var balance = Number(displayToken.balance);
|
|
34
|
+
var maxValue = Number(displayToken.max_value);
|
|
35
|
+
var minValue = Math.min(balance, maxValue);
|
|
36
|
+
onChange({
|
|
37
|
+
target: { value: minValue.toString() },
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { className: "p-4 rounded-16 backdrop-blur-[12px]", sx: {
|
|
42
|
+
border: "1px solid",
|
|
43
|
+
borderColor: "".concat((number && number < ((_b = displayToken === null || displayToken === void 0 ? void 0 : displayToken.min_value) !== null && _b !== void 0 ? _b : 0)) || (number && number > ((_c = displayToken === null || displayToken === void 0 ? void 0 : displayToken.max_value) !== null && _c !== void 0 ? _c : 0)) || (number && number > ((_d = Number(displayToken === null || displayToken === void 0 ? void 0 : displayToken.balance)) !== null && _d !== void 0 ? _d : 0)) ? "red" : "".concat(theme.palette.primary.main)),
|
|
44
|
+
}, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex justify-between", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { component: "p", sx: {
|
|
45
|
+
color: theme.palette.text.blackContrast,
|
|
46
|
+
fontWeight: theme.typography.fontWeight600,
|
|
47
|
+
}, children: "From" }), (0, jsx_runtime_1.jsxs)(Text_1.default, { component: "p", sx: {
|
|
48
|
+
color: theme.palette.text.accent,
|
|
49
|
+
fontSize: theme.typography.fontSize12,
|
|
50
|
+
fontWeight: theme.typography.fontWeight400,
|
|
51
|
+
}, children: ["Balance:", " ", (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
|
|
52
|
+
color: theme.palette.text.blackContrast,
|
|
53
|
+
fontWeight: theme.typography.fontWeight500,
|
|
54
|
+
fontSize: theme.typography.fontSize12,
|
|
55
|
+
}, children: [(0, getStandardNumber_1.default)(Number(displayToken === null || displayToken === void 0 ? void 0 : displayToken.balance)), " ", displayToken === null || displayToken === void 0 ? void 0 : displayToken.full_name] })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex justify-between mt-5 mb-4", children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex items-center gap-1 cursor-pointer", onClick: function () { return selectTokenForm.setTrue(); }, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: displayToken === null || displayToken === void 0 ? void 0 : displayToken.link, width: 20, height: 20, className: "rounded-full" }), (0, jsx_runtime_1.jsx)(Text_1.default, { component: "p", sx: {
|
|
56
|
+
color: theme.palette.text.blackContrast,
|
|
57
|
+
fontWeight: theme.typography.fontWeight600,
|
|
58
|
+
}, children: (displayToken === null || displayToken === void 0 ? void 0 : displayToken.name) || (displayToken === null || displayToken === void 0 ? void 0 : displayToken.full_name) }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("arrow_black_drop") })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { className: "w-full flex justify-end items-end", children: (0, jsx_runtime_1.jsx)(material_1.InputBase, { type: "number", value: number === undefined || number === null ? "" : (0, getStandardNumber_1.default)(number), onChange: onChange, classes: {
|
|
59
|
+
input: "text-end text-contrast max-w-fit bg-transparent border-none outline-none text-16 leading-140 font-bold placeholder:text-accent-1",
|
|
60
|
+
}, sx: {
|
|
61
|
+
"input::placeholder": {
|
|
62
|
+
fontSize: "13px",
|
|
63
|
+
},
|
|
64
|
+
}, placeholder: "Min ".concat(displayToken === null || displayToken === void 0 ? void 0 : displayToken.min_value, " - Max ").concat(displayToken === null || displayToken === void 0 ? void 0 : displayToken.max_value, " ").concat(displayToken === null || displayToken === void 0 ? void 0 : displayToken.full_name) }) })] }), (number && number > ((_e = displayToken === null || displayToken === void 0 ? void 0 : displayToken.max_value) !== null && _e !== void 0 ? _e : 0)) ||
|
|
65
|
+
(number && number < ((_f = displayToken === null || displayToken === void 0 ? void 0 : displayToken.min_value) !== null && _f !== void 0 ? _f : 0)) ||
|
|
66
|
+
(number && number > ((_g = Number(displayToken === null || displayToken === void 0 ? void 0 : displayToken.balance)) !== null && _g !== void 0 ? _g : 0)) ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex items-center gap-1", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("alert"), width: 14, height: 14 }), (0, jsx_runtime_1.jsx)(Text_1.default, { className: "text-red-500 font-normal text-12", children: "Insufficient balance" })] }), (0, jsx_runtime_1.jsx)(Button_1.default, { sx: {
|
|
67
|
+
textTransform: "capitalize",
|
|
68
|
+
backgroundColor: theme.palette.background.tertiary,
|
|
69
|
+
borderRadius: theme.mixins.customRadius.r8,
|
|
70
|
+
color: theme.palette.text.primary,
|
|
71
|
+
height: theme.typography.fontSize24,
|
|
72
|
+
padding: theme.mixins.customPadding.p12,
|
|
73
|
+
}, onClick: handleClickGetMaxValue, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
74
|
+
color: theme.palette.primary.main,
|
|
75
|
+
fontWeight: theme.typography.fontWeight600,
|
|
76
|
+
fontSize: theme.typography.fontSize12,
|
|
77
|
+
}, children: "Max" }) })] })) : ((0, jsx_runtime_1.jsx)(material_1.Box, { className: "flex justify-end", children: (0, jsx_runtime_1.jsx)(Button_1.default, { sx: {
|
|
78
|
+
textTransform: "capitalize",
|
|
79
|
+
backgroundColor: theme.palette.background.tertiary,
|
|
80
|
+
borderRadius: theme.mixins.customRadius.r8,
|
|
81
|
+
color: theme.palette.text.primary,
|
|
82
|
+
height: theme.typography.fontSize24,
|
|
83
|
+
padding: theme.mixins.customPadding.p12,
|
|
84
|
+
}, onClick: handleClickGetMaxValue, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
85
|
+
color: theme.palette.primary.main,
|
|
86
|
+
fontWeight: theme.typography.fontWeight600,
|
|
87
|
+
fontSize: theme.typography.fontSize12,
|
|
88
|
+
}, children: "Max" }) }) }))] }));
|
|
89
|
+
};
|
|
90
|
+
exports.default = CardForm;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Output, SupportedToken } from "../../../services/axios/get-swap-tokens-list-service/type";
|
|
2
|
+
interface Props {
|
|
3
|
+
className?: string;
|
|
4
|
+
token?: SupportedToken;
|
|
5
|
+
selectedOutputToken?: Output;
|
|
6
|
+
value?: number;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare const CardTo: ({ selectedOutputToken, token, value }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default CardTo;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
var material_1 = require("@mui/material");
|
|
8
|
+
var Icon_1 = __importDefault(require("../Icon"));
|
|
9
|
+
var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
|
|
10
|
+
var providers_1 = require("../../../providers");
|
|
11
|
+
var useBoolean_1 = require("../../../hooks/useBoolean");
|
|
12
|
+
var Text_1 = __importDefault(require("../Text"));
|
|
13
|
+
var roundToTwoSignificantDecimals_1 = __importDefault(require("../../../utils/roundToTwoSignificantDecimals"));
|
|
14
|
+
var CardTo = function (_a) {
|
|
15
|
+
var selectedOutputToken = _a.selectedOutputToken, token = _a.token, value = _a.value;
|
|
16
|
+
var selectTokenTo = (0, useBoolean_1.useBoolean)("selectTokenTo");
|
|
17
|
+
var cardFromUSDRate = Number(token === null || token === void 0 ? void 0 : token.usd_rate);
|
|
18
|
+
var cardToUSDRate = Number(selectedOutputToken === null || selectedOutputToken === void 0 ? void 0 : selectedOutputToken.usd_rate);
|
|
19
|
+
var totalAmount = (cardFromUSDRate * (value !== undefined ? value : 0)) / cardToUSDRate;
|
|
20
|
+
var theme = (0, providers_1.useTheme)();
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
22
|
+
padding: theme.mixins.customPadding.p12,
|
|
23
|
+
backgroundColor: theme.palette.background.tertiary,
|
|
24
|
+
borderRadius: theme.mixins.customRadius.r12,
|
|
25
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { className: "flex justify-between", children: (0, jsx_runtime_1.jsx)(Text_1.default, { component: "p", sx: {
|
|
26
|
+
color: theme.palette.text.blackContrast,
|
|
27
|
+
fontWeight: theme.typography.fontWeight600,
|
|
28
|
+
}, children: "To" }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex justify-between mt-5 mb-4", children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex items-center gap-1 cursor-pointer", onClick: function () { return selectTokenTo.setTrue(); }, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: selectedOutputToken === null || selectedOutputToken === void 0 ? void 0 : selectedOutputToken.link, width: 20, height: 20, className: "rounded-full" }), (0, jsx_runtime_1.jsx)(Text_1.default, { component: "p", sx: {
|
|
29
|
+
color: theme.palette.text.blackContrast,
|
|
30
|
+
fontWeight: theme.typography.fontWeight600,
|
|
31
|
+
}, children: (selectedOutputToken === null || selectedOutputToken === void 0 ? void 0 : selectedOutputToken.name) || (selectedOutputToken === null || selectedOutputToken === void 0 ? void 0 : selectedOutputToken.full_name) }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("arrow_black_drop") })] }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
32
|
+
color: theme.palette.text.blackContrast,
|
|
33
|
+
fontWeight: theme.typography.fontWeight600,
|
|
34
|
+
fontSize: theme.typography.fontSize16,
|
|
35
|
+
}, children: (0, roundToTwoSignificantDecimals_1.default)(totalAmount) || ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
36
|
+
color: theme.palette.text.accent,
|
|
37
|
+
}, children: "--" })) })] })] }));
|
|
38
|
+
};
|
|
39
|
+
exports.default = CardTo;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
className?: string;
|
|
3
|
+
icon?: string;
|
|
4
|
+
symbol?: string;
|
|
5
|
+
balance?: string;
|
|
6
|
+
price?: string;
|
|
7
|
+
rate?: string;
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const CardToken: ({ icon, symbol, balance, price, rate, isActive }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default CardToken;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
var material_1 = require("@mui/material");
|
|
8
|
+
var Icon_1 = __importDefault(require("../Icon"));
|
|
9
|
+
var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
|
|
10
|
+
var providers_1 = require("../../../providers");
|
|
11
|
+
var Text_1 = __importDefault(require("../Text"));
|
|
12
|
+
var CardToken = function (_a) {
|
|
13
|
+
var icon = _a.icon, symbol = _a.symbol, balance = _a.balance, price = _a.price, rate = _a.rate, _b = _a.isActive, isActive = _b === void 0 ? false : _b;
|
|
14
|
+
var theme = (0, providers_1.useTheme)();
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
16
|
+
border: "1px solid",
|
|
17
|
+
borderColor: "".concat(isActive ? theme.palette.primary.main : theme.palette.border.accent3),
|
|
18
|
+
backgroundColor: "".concat(isActive ? theme.palette.background.tertiary : theme.palette.background.white),
|
|
19
|
+
}, className: "p-4 rounded-16", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: icon || (0, getIcon_1.default)("".concat(icon)), width: 20, height: 20 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex flex-col justify-start", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { component: "p", sx: {
|
|
20
|
+
color: theme.palette.text.blackContrast,
|
|
21
|
+
fontWeight: theme.typography.fontWeight400,
|
|
22
|
+
fontSize: theme.typography.fontSize14,
|
|
23
|
+
}, children: symbol }), (0, jsx_runtime_1.jsx)(Text_1.default, { component: "p", sx: {
|
|
24
|
+
color: theme.palette.text.accent,
|
|
25
|
+
fontWeight: theme.typography.fontWeight400,
|
|
26
|
+
fontSize: theme.typography.fontSize12,
|
|
27
|
+
}, children: balance })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex flex-col justify-end items-end", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { component: "p", sx: {
|
|
28
|
+
color: theme.palette.text.blackContrast,
|
|
29
|
+
fontWeight: theme.typography.fontWeight500,
|
|
30
|
+
fontSize: theme.typography.fontSize14,
|
|
31
|
+
}, children: price }), (0, jsx_runtime_1.jsxs)(Text_1.default, { component: "p", sx: {
|
|
32
|
+
color: theme.palette.text.accent,
|
|
33
|
+
fontWeight: theme.typography.fontWeight400,
|
|
34
|
+
fontSize: theme.typography.fontSize12,
|
|
35
|
+
}, children: ["~$", rate] })] })] }) }));
|
|
36
|
+
};
|
|
37
|
+
exports.default = CardToken;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Output, SupportedToken } from "../../../services/axios/get-swap-tokens-list-service/type";
|
|
2
|
+
interface DetailSwapProps {
|
|
3
|
+
selectedToken?: SupportedToken;
|
|
4
|
+
selectOutputToken?: Output;
|
|
5
|
+
}
|
|
6
|
+
declare const DetailSwap: (props: DetailSwapProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default DetailSwap;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
var material_1 = require("@mui/material");
|
|
19
|
+
var providers_1 = require("../../../providers");
|
|
20
|
+
var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
|
|
21
|
+
var Icon_1 = __importDefault(require("../Icon"));
|
|
22
|
+
var LineValue_1 = __importDefault(require("../LineValue"));
|
|
23
|
+
var Text_1 = __importDefault(require("../Text"));
|
|
24
|
+
var DetailSwap = function (props) {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
var theme = (0, providers_1.useTheme)();
|
|
27
|
+
var getOutputID = props.selectOutputToken &&
|
|
28
|
+
((_a = props.selectedToken) === null || _a === void 0 ? void 0 : _a.outputs.find(function (output) { var _a; return output.id === Number((_a = props.selectOutputToken) === null || _a === void 0 ? void 0 : _a.id); }));
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), className: "gap-3 mt-2", children: [(0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(Text_1.default, { className: "capitalize opacity-90", sx: {
|
|
30
|
+
color: theme.palette.text.accent2,
|
|
31
|
+
fontSize: theme.typography.fontSize13,
|
|
32
|
+
fontWeight: theme.typography.fontWeight400,
|
|
33
|
+
}, children: "Transaction summary:" }) }), (0, jsx_runtime_1.jsx)(LineValue_1.default, { field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
34
|
+
color: theme.palette.text.accent,
|
|
35
|
+
fontSize: theme.typography.fontSize12,
|
|
36
|
+
fontWeight: theme.typography.fontWeight400,
|
|
37
|
+
}, children: "Best Price" }), value: (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)(Icon_1.default, { src: (0, getIcon_1.default)("ellipse"), width: 12, height: 12 }), (0, jsx_runtime_1.jsxs)(Text_1.default, { className: "truncate", sx: {
|
|
38
|
+
color: theme.palette.text.blackContrast,
|
|
39
|
+
fontSize: theme.typography.fontSize12,
|
|
40
|
+
fontWeight: theme.typography.fontWeight500,
|
|
41
|
+
}, children: ["1 ", (_b = props.selectedToken) === null || _b === void 0 ? void 0 : _b.full_name, " ~ ", getOutputID === null || getOutputID === void 0 ? void 0 : getOutputID.swap_amount, " ", getOutputID && getOutputID.full_name] })] }) }), (0, jsx_runtime_1.jsx)(LineValue_1.default, { field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
42
|
+
color: theme.palette.text.accent,
|
|
43
|
+
fontSize: theme.typography.fontSize12,
|
|
44
|
+
fontWeight: theme.typography.fontWeight400,
|
|
45
|
+
}, className: "capitalize", children: "Powered by" }), value: (0, jsx_runtime_1.jsx)(Text_1.default, { className: "truncate", sx: {
|
|
46
|
+
color: theme.palette.text.blackContrast,
|
|
47
|
+
fontSize: theme.typography.fontSize12,
|
|
48
|
+
fontWeight: theme.typography.fontWeight500,
|
|
49
|
+
}, children: "Liquidity Protocol" }) })] }));
|
|
50
|
+
};
|
|
51
|
+
exports.default = DetailSwap;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SwapResponse } from "../../../services/axios/swap-service/type";
|
|
3
|
+
interface DetailSwapResultProps {
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
swapData?: SwapResponse;
|
|
6
|
+
}
|
|
7
|
+
declare const DetailSwapResult: React.FC<DetailSwapResultProps>;
|
|
8
|
+
export default DetailSwapResult;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
var react_1 = require("react");
|
|
19
|
+
var useWallet_1 = __importDefault(require("../../../hooks/useWallet"));
|
|
20
|
+
var providers_1 = require("../../../providers");
|
|
21
|
+
var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
|
|
22
|
+
var Button_1 = __importDefault(require("../Button"));
|
|
23
|
+
var Text_1 = __importDefault(require("../Text"));
|
|
24
|
+
var material_1 = require("@mui/material");
|
|
25
|
+
var Icon_1 = __importDefault(require("../Icon"));
|
|
26
|
+
var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
|
|
27
|
+
var LineValue_1 = __importDefault(require("../LineValue"));
|
|
28
|
+
var formatDate_1 = __importDefault(require("../../../utils/formatDate"));
|
|
29
|
+
var roundToTwoSignificantDecimals_1 = __importDefault(require("../../../utils/roundToTwoSignificantDecimals"));
|
|
30
|
+
var DetailSwapResult = function (_a) {
|
|
31
|
+
var _b, _c;
|
|
32
|
+
var onClose = _a.onClose, swapData = _a.swapData;
|
|
33
|
+
var transaction = (0, useWallet_1.default)().transaction;
|
|
34
|
+
var theme = (0, providers_1.useTheme)();
|
|
35
|
+
var resultData = transaction || (swapData === null || swapData === void 0 ? void 0 : swapData.data);
|
|
36
|
+
var feeInfo = (0, react_1.useMemo)(function () {
|
|
37
|
+
var _a;
|
|
38
|
+
return (_a = resultData === null || resultData === void 0 ? void 0 : resultData.fee_info) === null || _a === void 0 ? void 0 : _a.fee_detail.map(function (item) { return item === null || item === void 0 ? void 0 : item.currency; });
|
|
39
|
+
}, [resultData]);
|
|
40
|
+
var getOutputs = feeInfo === null || feeInfo === void 0 ? void 0 : feeInfo.map(function (item) { return item === null || item === void 0 ? void 0 : item.outputs; });
|
|
41
|
+
var getDetailOutputs = getOutputs === null || getOutputs === void 0 ? void 0 : getOutputs[0].map(function (item) { return item; });
|
|
42
|
+
var getInfoDetailOutputs = (0, react_1.useMemo)(function () {
|
|
43
|
+
return getDetailOutputs === null || getDetailOutputs === void 0 ? void 0 : getDetailOutputs[0];
|
|
44
|
+
}, [getDetailOutputs]);
|
|
45
|
+
(0, react_1.useEffect)(function () { }, [resultData, resultData === null || resultData === void 0 ? void 0 : resultData.id]);
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: __assign({ color: theme.palette.text.black }, theme.mixins.pagePadding), footer: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
47
|
+
px: theme.mixins.customPadding.p12,
|
|
48
|
+
position: "relative",
|
|
49
|
+
bottom: theme.typography.fontSize24,
|
|
50
|
+
}, children: (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "processing" || (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "failed" ? ((0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: onClose, sx: __assign(__assign({ gap: theme.mixins.gaps.g4 }, theme.mixins.row), { color: theme.palette.text.secondary, borderRadius: theme.mixins.customRadius.r12, height: "40px" }), fullWidth: true, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
51
|
+
fontSize: theme.typography.fontSize12,
|
|
52
|
+
fontWeight: theme.typography.fontWeight600,
|
|
53
|
+
leading: theme.typography.leading160,
|
|
54
|
+
textTransform: "none",
|
|
55
|
+
color: theme.palette.secondary.main,
|
|
56
|
+
}, children: "Close" }) })) : ((resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "success" && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, justifyContent: "center" }), children: [(0, jsx_runtime_1.jsx)(Button_1.default.Secondary, { onClick: onClose, sx: __assign(__assign({ gap: theme.mixins.gaps.g4 }, theme.mixins.row), { borderRadius: theme.mixins.customRadius.r12, borderColor: theme.palette.primary.main, backgroundColor: "transparent", maxWidth: "168px", height: "40px" }), fullWidth: true, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
57
|
+
fontSize: theme.typography.fontSize13,
|
|
58
|
+
fontWeight: theme.typography.fontWeight600,
|
|
59
|
+
color: theme.palette.primary.main,
|
|
60
|
+
leading: theme.typography.leading160,
|
|
61
|
+
textTransform: "none",
|
|
62
|
+
}, children: "Close" }) }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: onClose, sx: __assign(__assign({ gap: theme.mixins.gaps.g4 }, theme.mixins.row), { color: theme.palette.text.secondary, borderRadius: theme.mixins.customRadius.r12, maxWidth: "168px", height: "40px" }), fullWidth: true, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
63
|
+
fontSize: theme.typography.fontSize13,
|
|
64
|
+
fontWeight: theme.typography.fontWeight600,
|
|
65
|
+
leading: theme.typography.leading160,
|
|
66
|
+
textTransform: "none",
|
|
67
|
+
color: theme.palette.secondary.main,
|
|
68
|
+
}, children: "View asset" }) })] }))) }), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ width: "100%" }, theme.mixins.column), { top: 0, transform: "translateY(30%)", gap: theme.mixins.gaps.g12, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.mixins.customRadius.r16, padding: theme.mixins.customPadding.p16, paddingTop: "80px", alignItems: "flex-start", position: "relative", marginTop: "75px" }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.center), { top: 0, width: "fit-content", height: "fit-content", borderRadius: theme.mixins.customRadius.r12, padding: theme.mixins.customPadding.p8 }), children: (0, jsx_runtime_1.jsx)(Icon_1.default, { width: 100, height: 100, src: (0, getIcon_1.default)((resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "success"
|
|
69
|
+
? "success"
|
|
70
|
+
: (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "failed"
|
|
71
|
+
? "failed"
|
|
72
|
+
: (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "processing"
|
|
73
|
+
? "processing"
|
|
74
|
+
: "") }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { mt: theme.mixins.customMargin.m8, textAlign: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
75
|
+
color: theme.palette.text.accent2,
|
|
76
|
+
fontSize: theme.typography.fontSize14,
|
|
77
|
+
fontWeight: theme.typography.fontWeight400,
|
|
78
|
+
}, children: "Swapping Token" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
79
|
+
color: (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "processing"
|
|
80
|
+
? theme.palette.text.warningStatus
|
|
81
|
+
: (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "failed"
|
|
82
|
+
? theme.palette.text.errorStatus
|
|
83
|
+
: (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "success"
|
|
84
|
+
? theme.palette.text.alertStatus
|
|
85
|
+
: theme.palette.text.warningStatus,
|
|
86
|
+
fontSize: theme.typography.fontSize24,
|
|
87
|
+
fontWeight: theme.typography.fontWeight600,
|
|
88
|
+
textTransform: "capitalize",
|
|
89
|
+
}, children: resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
|
|
90
|
+
width: "100%",
|
|
91
|
+
color: theme.palette.text.accent,
|
|
92
|
+
mt: theme.mixins.customMargin.m12,
|
|
93
|
+
} }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "space-between", mt: theme.mixins.customMargin.m16 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: (_b = resultData === null || resultData === void 0 ? void 0 : resultData.currency_data) === null || _b === void 0 ? void 0 : _b.link, width: 20, height: 20, className: "rounded-full" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
94
|
+
fontSize: theme.typography.fontSize14,
|
|
95
|
+
fontWeight: theme.typography.fontWeight700,
|
|
96
|
+
}, children: resultData === null || resultData === void 0 ? void 0 : resultData.amount })] }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("swap_horizontal"), width: 20, height: 20 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: getInfoDetailOutputs === null || getInfoDetailOutputs === void 0 ? void 0 : getInfoDetailOutputs.link, width: 20, height: 20, className: "rounded-full" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
97
|
+
fontSize: theme.typography.fontSize14,
|
|
98
|
+
fontWeight: theme.typography.fontWeight700,
|
|
99
|
+
}, children: (0, roundToTwoSignificantDecimals_1.default)((resultData === null || resultData === void 0 ? void 0 : resultData.amount) * (getInfoDetailOutputs === null || getInfoDetailOutputs === void 0 ? void 0 : getInfoDetailOutputs.swap_amount)) })] })] }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
|
|
100
|
+
width: "100%",
|
|
101
|
+
color: theme.palette.text.accent,
|
|
102
|
+
mt: theme.mixins.customMargin.m12,
|
|
103
|
+
} }), (0, jsx_runtime_1.jsx)(LineValue_1.default, { sx: {
|
|
104
|
+
mt: theme.mixins.customMargin.m16,
|
|
105
|
+
mb: theme.mixins.customMargin.m16,
|
|
106
|
+
}, field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
107
|
+
fontSize: theme.typography.fontSize12,
|
|
108
|
+
color: theme.palette.text.blackContrast,
|
|
109
|
+
}, children: "Price" }), value: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
|
|
110
|
+
fontSize: theme.typography.fontSize14,
|
|
111
|
+
fontWeight: theme.typography.fontWeight700,
|
|
112
|
+
ml: theme.mixins.customMargin.m8,
|
|
113
|
+
}, children: ["1 ", (_c = resultData === null || resultData === void 0 ? void 0 : resultData.currency_data) === null || _c === void 0 ? void 0 : _c.full_name, " ~ ", getInfoDetailOutputs === null || getInfoDetailOutputs === void 0 ? void 0 : getInfoDetailOutputs.swap_amount, " ", getInfoDetailOutputs === null || getInfoDetailOutputs === void 0 ? void 0 : getInfoDetailOutputs.full_name] }) }), (0, jsx_runtime_1.jsx)(LineValue_1.default, { field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
114
|
+
fontSize: theme.typography.fontSize12,
|
|
115
|
+
color: theme.palette.text.blackContrast,
|
|
116
|
+
}, children: "Date time" }), value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
117
|
+
fontSize: theme.typography.fontSize14,
|
|
118
|
+
fontWeight: theme.typography.fontWeight700,
|
|
119
|
+
ml: theme.mixins.customMargin.m8,
|
|
120
|
+
}, children: (0, formatDate_1.default)(resultData === null || resultData === void 0 ? void 0 : resultData.date_created) }) })] })] }) }));
|
|
121
|
+
};
|
|
122
|
+
exports.default = DetailSwapResult;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SxProps } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export declare enum DRAWER_DIRECTION {
|
|
4
|
+
TOP = "top",
|
|
5
|
+
BOTTOM = "bottom",
|
|
6
|
+
LEFT = "left",
|
|
7
|
+
RIGHT = "right"
|
|
8
|
+
}
|
|
9
|
+
interface Props {
|
|
10
|
+
anchor?: DRAWER_DIRECTION;
|
|
11
|
+
open: boolean;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
onOpen: () => void;
|
|
14
|
+
className?: string;
|
|
15
|
+
content: React.ReactNode;
|
|
16
|
+
title?: React.ReactNode;
|
|
17
|
+
footer?: React.ReactNode;
|
|
18
|
+
sx?: SxProps;
|
|
19
|
+
}
|
|
20
|
+
declare const DrawerDrag: ({ anchor, open, onClose, onOpen, content, title, footer, sx }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default DrawerDrag;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DRAWER_DIRECTION = void 0;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var material_1 = require("@mui/material");
|
|
6
|
+
var providers_1 = require("../../../providers");
|
|
7
|
+
var DRAWER_DIRECTION;
|
|
8
|
+
(function (DRAWER_DIRECTION) {
|
|
9
|
+
DRAWER_DIRECTION["TOP"] = "top";
|
|
10
|
+
DRAWER_DIRECTION["BOTTOM"] = "bottom";
|
|
11
|
+
DRAWER_DIRECTION["LEFT"] = "left";
|
|
12
|
+
DRAWER_DIRECTION["RIGHT"] = "right";
|
|
13
|
+
})(DRAWER_DIRECTION || (exports.DRAWER_DIRECTION = DRAWER_DIRECTION = {}));
|
|
14
|
+
var DrawerDrag = function (_a) {
|
|
15
|
+
var anchor = _a.anchor, open = _a.open, onClose = _a.onClose, onOpen = _a.onOpen, content = _a.content, title = _a.title, footer = _a.footer, sx = _a.sx;
|
|
16
|
+
var theme = (0, providers_1.useTheme)();
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(material_1.SwipeableDrawer, { anchor: anchor || DRAWER_DIRECTION.BOTTOM, open: open, onClose: onClose || (function () { }), onOpen: onOpen, sx: sx
|
|
18
|
+
? sx
|
|
19
|
+
: {
|
|
20
|
+
"& .MuiDrawer-paper": {
|
|
21
|
+
backgroundColor: "transparent",
|
|
22
|
+
},
|
|
23
|
+
}, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "\n \"w-full border-t border-".concat(theme.palette.border.accent3, " bg-").concat(theme.palette.background.tertiary, " blur-[50px]\",\n className,\n ").concat(anchor === DRAWER_DIRECTION.BOTTOM && "min-h-[33dvh]", "\n "), children: [title, content, footer] }) }));
|
|
24
|
+
};
|
|
25
|
+
exports.default = DrawerDrag;
|
|
@@ -75,7 +75,7 @@ function Fees(props) {
|
|
|
75
75
|
if (!isNotEnoughBalanceToPayFee) {
|
|
76
76
|
setIsEnoughBalanceToPayFee === null || setIsEnoughBalanceToPayFee === void 0 ? void 0 : setIsEnoughBalanceToPayFee(!isNotEnoughBalanceToPayFee);
|
|
77
77
|
}
|
|
78
|
-
}, [isNotEnoughBalanceToPayFee]);
|
|
78
|
+
}, [isNotEnoughBalanceToPayFee, setIsEnoughBalanceToPayFee]);
|
|
79
79
|
var totalfee_in_usd = (0, react_1.useMemo)(function () {
|
|
80
80
|
return feesData === null || feesData === void 0 ? void 0 : feesData.fee_in_usd;
|
|
81
81
|
}, [feesData]);
|
|
@@ -127,12 +127,12 @@ exports.default = Fees;
|
|
|
127
127
|
var FeeDetails = function (_a) {
|
|
128
128
|
var feeName = _a.feeName, fee_in_currency = _a.fee_in_currency, fee_in_usd = _a.fee_in_usd, currencyName = _a.currencyName;
|
|
129
129
|
var theme = (0, ThemeProvider_1.useTheme)();
|
|
130
|
-
return ((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: {
|
|
130
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4, justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
131
131
|
fontSize: theme.typography.fontSize11,
|
|
132
132
|
fontWeight: theme.typography.fontWeight500,
|
|
133
133
|
lineHeight: theme.typography.leading160,
|
|
134
134
|
color: theme.palette.text.accent,
|
|
135
135
|
pl: theme.mixins.gaps.g12,
|
|
136
136
|
whiteSpace: "nowrap",
|
|
137
|
-
}, children: feeName }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.
|
|
137
|
+
}, children: feeName }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { alignItems: "end", gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: __assign({}, theme.mixins.value), value: fee_in_currency, unit: " ".concat(currencyName) }), (0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: __assign({}, theme.mixins.valueDescription), value: fee_in_usd, start: "~ $" })] })] }));
|
|
138
138
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Output, SupportedToken } from "../../../services/axios/get-swap-tokens-list-service/type";
|
|
2
|
+
interface ModalSelectTokenProps {
|
|
3
|
+
setSwapToken?: (token: SupportedToken) => void;
|
|
4
|
+
token?: SupportedToken;
|
|
5
|
+
outputToken?: Output;
|
|
6
|
+
setOutputToken?: (output: Output) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const ModalSelectToken: (props: ModalSelectTokenProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default ModalSelectToken;
|