tek-wallet 0.0.378 → 0.0.380
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.
|
@@ -35,15 +35,25 @@ var jsx_runtime_2 = require("react/jsx-runtime");
|
|
|
35
35
|
var FeeDetail = function (_a) {
|
|
36
36
|
var feeName = _a.feeName, value = _a.value;
|
|
37
37
|
var theme = (0, material_1.useTheme)();
|
|
38
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.row), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.fieldTitle), children: feeName }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), {
|
|
38
|
+
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: __assign(__assign({}, theme.mixins.fieldTitle), { whiteSpace: "nowrap" }), children: feeName }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { flex: 1, width: "fit-content", alignItems: "flex-end" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: value }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: value, start: "~ " }) })] })] }));
|
|
39
39
|
};
|
|
40
40
|
function Fees(props) {
|
|
41
41
|
var sx = props.sx, rest = __rest(props, ["sx"]);
|
|
42
42
|
var theme = (0, material_1.useTheme)();
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Accordion, __assign({ defaultExpanded: true }, rest, { sx: __assign({ "&.
|
|
43
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Accordion, __assign({ defaultExpanded: true }, rest, { sx: __assign({ "&.MuiAccordion-root": {
|
|
44
44
|
backgroundColor: "transparent",
|
|
45
45
|
margin: 0,
|
|
46
|
-
|
|
46
|
+
borderRadius: theme.mixins.theBorderRadius.r12,
|
|
47
|
+
}, "& .MuiAccordionSummary-root": {
|
|
48
|
+
paddingLeft: theme.mixins.customPadding.p12,
|
|
49
|
+
paddingRight: theme.mixins.customPadding.p12,
|
|
50
|
+
}, "& .MuiAccordionSummary-content": {
|
|
51
|
+
marginTop: theme.mixins.customMargin.m12,
|
|
52
|
+
marginBottom: theme.mixins.customMargin.m12,
|
|
53
|
+
}, "& .MuiAccordionDetails-root": {
|
|
54
|
+
paddingLeft: theme.mixins.customPadding.p12,
|
|
55
|
+
paddingRight: theme.mixins.customPadding.p12,
|
|
56
|
+
} }, sx), children: [(0, jsx_runtime_1.jsx)(material_1.AccordionSummary, { expandIcon: (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("arrow_down"), width: 20 }), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.row), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.fieldTitle), children: "Total fees" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: 1000 }) })] }) }), (0, jsx_runtime_1.jsx)(material_1.AccordionDetails, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { alignItems: "stretch" }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", gap: 1 }), children: [1, 2, 3].map(function (item, index) { return ((0, jsx_runtime_1.jsxs)(jsx_runtime_2.Fragment, { children: [index !== 0 && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
47
57
|
borderRight: "1px dashed ".concat(theme.palette.border.black16),
|
|
48
58
|
flex: 1,
|
|
49
59
|
} })), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("timeline_dot"), width: 16 })] }, item)); }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { flex: 1 }), children: [(0, jsx_runtime_1.jsx)(FeeDetail, { feeName: "Fee 1", value: 1000 }), (0, jsx_runtime_1.jsx)(FeeDetail, { feeName: "Fee 2", value: 1000 }), (0, jsx_runtime_1.jsx)(FeeDetail, { feeName: "Fee 3", value: 1000 })] })] }) })] })));
|
|
@@ -12,8 +12,8 @@ type ReceiveFunctionRef = {
|
|
|
12
12
|
close: () => void;
|
|
13
13
|
};
|
|
14
14
|
export declare enum ReceiveMethods {
|
|
15
|
-
RECEIVE_INTERNAL = "
|
|
16
|
-
RECEIVE_EXTERNAL = "
|
|
15
|
+
RECEIVE_INTERNAL = "Receive internally",
|
|
16
|
+
RECEIVE_EXTERNAL = "Receive externally"
|
|
17
17
|
}
|
|
18
18
|
declare const ReceiveFunction: import("react").ForwardRefExoticComponent<ReceiveFunctionProps & import("react").RefAttributes<ReceiveFunctionRef>>;
|
|
19
19
|
export default ReceiveFunction;
|
|
@@ -79,8 +79,8 @@ var CustomTooltip_1 = __importDefault(require("../CustomTooltip"));
|
|
|
79
79
|
var DialogContentLayout_1 = __importDefault(require("../DialogContentLayout"));
|
|
80
80
|
var ReceiveMethods;
|
|
81
81
|
(function (ReceiveMethods) {
|
|
82
|
-
ReceiveMethods["RECEIVE_INTERNAL"] = "
|
|
83
|
-
ReceiveMethods["RECEIVE_EXTERNAL"] = "
|
|
82
|
+
ReceiveMethods["RECEIVE_INTERNAL"] = "Receive internally";
|
|
83
|
+
ReceiveMethods["RECEIVE_EXTERNAL"] = "Receive externally";
|
|
84
84
|
})(ReceiveMethods || (exports.ReceiveMethods = ReceiveMethods = {}));
|
|
85
85
|
var ReceiveStep;
|
|
86
86
|
(function (ReceiveStep) {
|
|
@@ -171,7 +171,7 @@ var ReceiveFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
171
171
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Please", " ", (0, jsx_runtime_1.jsx)("strong", { style: { color: theme.palette.text.white }, children: "select the correct network" }), ", unless you will lose your assets."] }));
|
|
172
172
|
}
|
|
173
173
|
if (selectedMethod === ReceiveMethods.RECEIVE_INTERNAL && !amount) {
|
|
174
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["The amount must be between", " ", (0, jsx_runtime_1.jsxs)("strong", { style: { color: theme.palette.text.white }, children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.min_value }), " to", " ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.max_value, unit: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name })
|
|
174
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["The amount must be between", " ", (0, jsx_runtime_1.jsxs)("strong", { style: { color: theme.palette.text.white }, children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.min_value }), " to", " ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.max_value, unit: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name })] }), ", unless you will lose your assets."] }));
|
|
175
175
|
}
|
|
176
176
|
return null;
|
|
177
177
|
}, [selectedMethod, selectedToken, amount]);
|
|
@@ -318,7 +318,9 @@ var ReceiveFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
318
318
|
display: "flex",
|
|
319
319
|
flexDirection: "column",
|
|
320
320
|
gap: theme.mixins.gaps.g16,
|
|
321
|
-
}, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ width: "100%" }, theme.mixins.column), { gap: theme.mixins.gaps.g12, backgroundColor: theme.palette.background.black24, borderRadius: theme.mixins.theBorderRadius.r16, padding: theme.mixins.customPadding.p16, alignItems: "flex-start", backdropFilter: "blur(10px)" }), id: "share-receive-info", children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, color: "text.white", alignSelf: "center" }), children: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { textAlign: "center" }), children: ["Receive", " ", (0, jsx_runtime_1.jsxs)("strong", { children: [!!amount && (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amount }), " ", selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name, " ", selectedMethod
|
|
321
|
+
}, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ width: "100%" }, theme.mixins.column), { gap: theme.mixins.gaps.g12, backgroundColor: theme.palette.background.black24, borderRadius: theme.mixins.theBorderRadius.r16, padding: theme.mixins.customPadding.p16, alignItems: "flex-start", backdropFilter: "blur(10px)" }), id: "share-receive-info", children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, color: "text.white", alignSelf: "center" }), children: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { textAlign: "center" }), children: ["Receive", " ", (0, jsx_runtime_1.jsxs)("strong", { children: [!!amount && (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amount }), " ", selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name] }), " ", selectedMethod === ReceiveMethods.RECEIVE_INTERNAL
|
|
322
|
+
? "Internally"
|
|
323
|
+
: "Externally"] }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
322
324
|
position: "relative",
|
|
323
325
|
width: "fit-content",
|
|
324
326
|
height: "fit-content",
|
|
@@ -327,7 +329,7 @@ var ReceiveFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
327
329
|
overflow: "hidden",
|
|
328
330
|
backgroundColor: theme.palette.background.white,
|
|
329
331
|
backdropFilter: "blur(10px)",
|
|
330
|
-
}, children: (0, jsx_runtime_1.jsx)(QRCode_1.default, { value: qrCodeValue,
|
|
332
|
+
}, children: (0, jsx_runtime_1.jsx)(QRCode_1.default, { value: qrCodeValue, logo: (0, getIcon_1.default)("ton"), bgColor: "transparent" }) }), selectedMethod === ReceiveMethods.RECEIVE_EXTERNAL && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, color: "text.white" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Network" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { component: "button", sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g2, cursor: "pointer", transition: "transform 0.3s ease-in-out", "&:active": {
|
|
331
333
|
transform: "translateX(0.5rem)",
|
|
332
334
|
} }), onClick: handleBack, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.name }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("right_arrow"), width: 10 })] })] })), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, color: "text.white" }), 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)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: selectedMethod === ReceiveMethods.RECEIVE_INTERNAL
|
|
333
335
|
? "Internal address"
|