tek-wallet 0.0.387 → 0.0.388
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.
|
@@ -33,11 +33,6 @@ var Text_1 = __importDefault(require("../Text"));
|
|
|
33
33
|
var Formatter_1 = __importDefault(require("../Formatter"));
|
|
34
34
|
var jsx_runtime_2 = require("react/jsx-runtime");
|
|
35
35
|
var parsePropsData_1 = __importDefault(require("../../../utils/parsePropsData"));
|
|
36
|
-
var FeeDetail = function (_a) {
|
|
37
|
-
var feeName = _a.feeName, feeInCurrency = _a.feeInCurrency, feeInUSD = _a.feeInUSD, currencyName = _a.currencyName;
|
|
38
|
-
var theme = (0, material_1.useTheme)();
|
|
39
|
-
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: feeInCurrency, unit: currencyName }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: feeInUSD, start: "~ $" }) })] })] }));
|
|
40
|
-
};
|
|
41
36
|
function Fees(props) {
|
|
42
37
|
var _a, _b;
|
|
43
38
|
var sx = props.sx, rest = __rest(props, ["sx"]);
|
|
@@ -73,3 +68,8 @@ function Fees(props) {
|
|
|
73
68
|
}) })] }) })] })));
|
|
74
69
|
}
|
|
75
70
|
exports.default = Fees;
|
|
71
|
+
var FeeDetail = function (_a) {
|
|
72
|
+
var feeName = _a.feeName, feeInCurrency = _a.feeInCurrency, feeInUSD = _a.feeInUSD, currencyName = _a.currencyName;
|
|
73
|
+
var theme = (0, material_1.useTheme)();
|
|
74
|
+
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: feeInCurrency, unit: " ".concat(currencyName) }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: feeInUSD, start: "~ $" }) })] })] }));
|
|
75
|
+
};
|
|
@@ -189,6 +189,11 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
189
189
|
}
|
|
190
190
|
return newNetWorks;
|
|
191
191
|
}, [selectedToken, selectedNetwork]);
|
|
192
|
+
var estimateReceive = (0, react_1.useMemo)(function () {
|
|
193
|
+
if (!estimateFee || !amount)
|
|
194
|
+
return undefined;
|
|
195
|
+
return +amount - +(estimateFee === null || estimateFee === void 0 ? void 0 : estimateFee.feeInCurrency);
|
|
196
|
+
}, [estimateFee, amount]);
|
|
192
197
|
var clearValues = function () {
|
|
193
198
|
setSelectedToken(undefined);
|
|
194
199
|
setSelectedNetwork(undefined);
|
|
@@ -606,11 +611,11 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
606
611
|
placeholder: "Enter memo",
|
|
607
612
|
value: memo,
|
|
608
613
|
onChange: handleChangeMemo,
|
|
609
|
-
} })] })), (0, jsx_runtime_1.jsx)(Fees_1.default, { feesData: JSON.stringify(estimateFee) }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { width: "100%" }, onClick: handleSend, status: !!amountError ||
|
|
614
|
+
} })] })), (0, jsx_runtime_1.jsx)(Fees_1.default, { feesData: JSON.stringify(estimateFee) }), (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: "Estimate receive" }), (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleReSelectNetwork, sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g6, ml: "auto", cursor: "pointer" }), children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: estimateReceive }) }) })] }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { width: "100%" }, onClick: handleSend, status: !!amountError ||
|
|
615
|
+
!!recipientAddressError ||
|
|
610
616
|
!recipientAddress ||
|
|
611
617
|
!amount ||
|
|
612
618
|
!selectedToken ||
|
|
613
|
-
!!recipientAddressError ||
|
|
614
619
|
isLoadingEstimateFee
|
|
615
620
|
? Button_1.BUTTON_STATUS.DISABLED
|
|
616
621
|
: Button_1.BUTTON_STATUS.ENABLED, children: "Continue" })] }) }, WithdrawStep.FORM)] }, swiperKey), (0, jsx_runtime_1.jsx)(QrCodeReader_1.default, { ref: scannerAllQrCodeRef, onResult: handleScanAllQrCode }), (0, jsx_runtime_1.jsx)(QrCodeReader_1.default, { ref: scannerAddressQrCodeRef, onResult: handleScanAddressQrCode }), (0, jsx_runtime_1.jsx)(AppBackDrop_1.default, { ref: backDropRef }), (0, jsx_runtime_1.jsx)(AppDialog_1.default, { overrideOpen: !!infoDialogContent, children: (0, jsx_runtime_1.jsx)(DialogContentLayout_1.default, { content: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|