tek-wallet 0.0.785 → 0.0.787
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/CopyTextComponent/index.js +1 -1
- package/dist/components/TekWallet/components/ui/InlineTitleValue/index.d.ts +1 -0
- package/dist/components/TekWallet/components/ui/InlineTitleValue/index.js +6 -3
- package/dist/components/TekWallet/components/views/SendExternalView/components/Summary.js +3 -4
- package/dist/components/TekWallet/components/views/SendInternalView/components/Summary.js +6 -7
- package/dist/components/TekWallet/components/views/SwapView/components/ToCard/index.js +15 -8
- package/package.json +1 -1
|
@@ -104,7 +104,7 @@ var CopyTextComponent = function (_a) {
|
|
|
104
104
|
? "opacity 0.5s linear, transform 0.17s linear"
|
|
105
105
|
: "opacity 0.15s linear, transform 0.1s linear",
|
|
106
106
|
}, children: [iconSuccess || (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1rem", height: "1rem" }, children: SvgPath_1.IC_SUCCESS }), !hideTextMessage && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
107
|
-
color:
|
|
107
|
+
color: theme.palette.text.successStatus,
|
|
108
108
|
fontSize: theme.typography.fontSize14,
|
|
109
109
|
lineHeight: theme.typography.leading100,
|
|
110
110
|
whiteSpace: "nowrap",
|
|
@@ -6,6 +6,7 @@ interface InlineTitleValueProps {
|
|
|
6
6
|
lined?: boolean | undefined;
|
|
7
7
|
isAligned?: boolean | undefined;
|
|
8
8
|
alignVertical?: string | undefined;
|
|
9
|
+
column?: boolean | undefined;
|
|
9
10
|
}
|
|
10
11
|
export default function InlineTitleValue(props: InlineTitleValueProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export type { InlineTitleValueProps };
|
|
@@ -18,14 +18,17 @@ exports.default = InlineTitleValue;
|
|
|
18
18
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
19
|
var material_1 = require("@mui/material");
|
|
20
20
|
var Text_1 = __importDefault(require("../Text"));
|
|
21
|
+
var providers_1 = require("../../../providers");
|
|
21
22
|
function InlineTitleValue(props) {
|
|
22
|
-
var title = props.title, value = props.value, lined = props.lined, isAligned = props.isAligned, alignVertical = props.alignVertical, titleStyle = props.titleStyle;
|
|
23
|
+
var title = props.title, value = props.value, lined = props.lined, isAligned = props.isAligned, alignVertical = props.alignVertical, titleStyle = props.titleStyle, column = props.column;
|
|
24
|
+
var theme = (0, providers_1.useTheme)();
|
|
23
25
|
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
24
26
|
display: "flex",
|
|
25
|
-
|
|
27
|
+
flexDirection: column ? "column" : "row",
|
|
28
|
+
gap: theme.mixins.gaps.g8,
|
|
26
29
|
width: "100%",
|
|
27
30
|
justifyContent: isAligned ? "space-between" : "flex-start",
|
|
28
|
-
alignItems: alignVertical !== null && alignVertical !== void 0 ? alignVertical : "center",
|
|
31
|
+
alignItems: alignVertical !== null && alignVertical !== void 0 ? alignVertical : (column ? "flex-start" : "center"),
|
|
29
32
|
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({ color: "positive", whiteSpace: "nowrap" }, titleStyle), children: title }), lined && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
30
33
|
width: "100%",
|
|
31
34
|
height: "1px",
|
|
@@ -66,7 +66,6 @@ var InlineTitleValue_1 = __importDefault(require("../../../ui/InlineTitleValue")
|
|
|
66
66
|
var CopyTextComponent_1 = __importDefault(require("../../../ui/CopyTextComponent"));
|
|
67
67
|
var SvgPath_1 = require("../../../ui/SvgPath");
|
|
68
68
|
var Fees_1 = __importStar(require("../../../ui/Fees"));
|
|
69
|
-
var safeText_1 = require("../../../../utils/safeText");
|
|
70
69
|
var react_1 = require("react");
|
|
71
70
|
var Button_1 = __importStar(require("../../../ui/Button"));
|
|
72
71
|
var providers_1 = require("../../../../providers");
|
|
@@ -89,16 +88,16 @@ function Summary(props) {
|
|
|
89
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: {
|
|
90
89
|
display: "flex",
|
|
91
90
|
flexDirection: "column",
|
|
92
|
-
gap: theme.mixins.gaps.
|
|
91
|
+
gap: theme.mixins.gaps.g16,
|
|
93
92
|
}, children: [(0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Amount", titleStyle: {
|
|
94
93
|
fontSize: "0.875rem",
|
|
95
94
|
fontWeight: 500,
|
|
96
95
|
color: "gray.700",
|
|
97
|
-
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amount, unit: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Recipient address", titleStyle: {
|
|
96
|
+
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amount, unit: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Recipient address", column: true, titleStyle: {
|
|
98
97
|
fontSize: "0.875rem",
|
|
99
98
|
fontWeight: 500,
|
|
100
99
|
color: "gray.700",
|
|
101
|
-
}, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", children: (0, jsx_runtime_1.jsxs)(material_1.Box, {
|
|
100
|
+
}, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: recipientAddress }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
|
|
102
101
|
width: 16,
|
|
103
102
|
height: 16,
|
|
104
103
|
}, children: SvgPath_1.IC_COPY })] }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Network", titleStyle: {
|
|
@@ -66,7 +66,6 @@ var InlineTitleValue_1 = __importDefault(require("../../../ui/InlineTitleValue")
|
|
|
66
66
|
var CopyTextComponent_1 = __importDefault(require("../../../ui/CopyTextComponent"));
|
|
67
67
|
var SvgPath_1 = require("../../../ui/SvgPath");
|
|
68
68
|
var Fees_1 = __importStar(require("../../../ui/Fees"));
|
|
69
|
-
var safeText_1 = require("../../../../utils/safeText");
|
|
70
69
|
var ConfirmSendInternal_1 = __importDefault(require("../../../ui/ConfirmSendInternal"));
|
|
71
70
|
var react_1 = require("react");
|
|
72
71
|
var Button_1 = __importStar(require("../../../ui/Button"));
|
|
@@ -83,28 +82,28 @@ function Summary(props) {
|
|
|
83
82
|
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
84
83
|
display: "flex",
|
|
85
84
|
flexDirection: "column",
|
|
86
|
-
gap:
|
|
85
|
+
gap: 4,
|
|
87
86
|
height: "100%",
|
|
88
87
|
}, 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: {
|
|
89
88
|
display: "flex",
|
|
90
89
|
flexDirection: "column",
|
|
91
|
-
gap:
|
|
90
|
+
gap: theme.mixins.gaps.g16,
|
|
92
91
|
}, children: [(0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Amount", titleStyle: {
|
|
93
92
|
fontSize: "0.875rem",
|
|
94
93
|
fontWeight: 500,
|
|
95
94
|
color: "gray.700",
|
|
96
|
-
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amount, unit: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Recipient address", titleStyle: {
|
|
95
|
+
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { textAlign: "right" }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amount, unit: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { column: true, title: "Recipient address", titleStyle: {
|
|
97
96
|
fontSize: "0.875rem",
|
|
98
97
|
fontWeight: 500,
|
|
99
98
|
color: "gray.700",
|
|
100
|
-
}, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", children: (0, jsx_runtime_1.jsxs)(material_1.Box, {
|
|
99
|
+
}, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: recipientAddress }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
|
|
101
100
|
width: 16,
|
|
102
101
|
height: 16,
|
|
103
|
-
}, children: SvgPath_1.IC_COPY })] }) }), isAligned: true }), message && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Message", titleStyle: {
|
|
102
|
+
}, children: SvgPath_1.IC_COPY })] }) }), isAligned: true }), message && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { column: true, title: "Message", titleStyle: {
|
|
104
103
|
fontSize: "0.875rem",
|
|
105
104
|
fontWeight: 500,
|
|
106
105
|
color: "gray.700",
|
|
107
|
-
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: message }), isAligned: true })), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: estimateFee, amount: +(amount || 0), tokenSlug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "", feesStyle: Fees_1.FeesStyle.DEFAULT })] }), (0, jsx_runtime_1.jsx)(ConfirmSendInternal_1.default, __assign({ sx: {
|
|
106
|
+
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { textAlign: "left" }), children: message }), isAligned: true })), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: estimateFee, amount: +(amount || 0), tokenSlug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "", feesStyle: Fees_1.FeesStyle.DEFAULT })] }), (0, jsx_runtime_1.jsx)(ConfirmSendInternal_1.default, __assign({ sx: {
|
|
108
107
|
width: "100%",
|
|
109
108
|
marginTop: "auto",
|
|
110
109
|
}, payload: payload }, confirmPropsRest, { onSuccess: function (res) {
|
|
@@ -1,4 +1,15 @@
|
|
|
1
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
|
+
};
|
|
2
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
14
|
if (k2 === undefined) k2 = k;
|
|
4
15
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -89,14 +100,10 @@ var ToCard = function (_a) {
|
|
|
89
100
|
(0, react_1.useEffect)(function () {
|
|
90
101
|
selectDefaultToToken();
|
|
91
102
|
}, [selectDefaultToToken]);
|
|
92
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { className: "flex justify-between", children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
97
|
-
color: theme.palette.text.blackContrast,
|
|
98
|
-
fontWeight: theme.typography.fontWeight600,
|
|
99
|
-
}, children: "To" }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex justify-between mt-5 mb-4", children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: selectTokenRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex items-center gap-1 cursor-pointer", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: selectedToToken === null || selectedToToken === void 0 ? void 0 : selectedToToken.link, width: 20, height: 20, className: "rounded-full" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
103
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ padding: theme.mixins.customPadding.p16, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.mixins.customRadius.r16 }, theme.mixins.column), { gap: theme.mixins.gaps.g16 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
104
|
+
color: theme.palette.text.blackContrast,
|
|
105
|
+
fontWeight: theme.typography.fontWeight600,
|
|
106
|
+
}, children: "To" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12, width: "100%", justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: selectTokenRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex items-center gap-1 cursor-pointer", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: selectedToToken === null || selectedToToken === void 0 ? void 0 : selectedToToken.link, width: 20, height: 20, className: "rounded-full" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
100
107
|
color: theme.palette.text.blackContrast,
|
|
101
108
|
fontWeight: theme.typography.fontWeight600,
|
|
102
109
|
}, children: (selectedToToken === null || selectedToToken === void 0 ? void 0 : selectedToToken.name) || (selectedToToken === null || selectedToToken === void 0 ? void 0 : selectedToToken.full_name) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 10, height: 10 }, children: SvgPath_1.IC_ARROW_BLACK_DROP })] }), children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Select Token", overrideBack: closeSelectToken }), children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
|