tek-wallet 0.0.394 → 0.0.396
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.
|
@@ -340,7 +340,7 @@ var ReceiveFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
340
340
|
}, trigger: (0, jsx_runtime_1.jsxs)(Button_1.default.Text, { sx: {
|
|
341
341
|
fontSize: theme.typography.fontSize12,
|
|
342
342
|
textTransform: "none",
|
|
343
|
-
}, children: [amount ? "Edit" : "+ Set", " amount"] }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.fieldTitle), children: [amount ? "Edit" : "
|
|
343
|
+
}, children: [amount ? "Edit" : "+ Set", " amount"] }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.fieldTitle), children: [amount ? "Edit" : "Set", " ", selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name, " amount"] }), (0, jsx_runtime_1.jsx)(material_1.Input, { placeholder: "".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.min_value, " - ").concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.max_value), sx: __assign(__assign({}, theme.mixins.value), { fontSize: theme.typography.fontSize16 }), value: inputAmount, onChange: handleChangeAmount }), amountError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: amountError })), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { width: "100%", mt: theme.mixins.customMargin.m8, gap: theme.mixins.gaps.g12 }), children: [!!amount && ((0, jsx_runtime_1.jsx)(Button_1.default.Text, { onClick: handleUnset, children: "Unset" })), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { flex: 1 }, onClick: handleContinue, status: !!amountError
|
|
344
344
|
? Button_1.BUTTON_STATUS.DISABLED
|
|
345
345
|
: Button_1.BUTTON_STATUS.ENABLED, children: "Continue" })] })] }) }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12, justifyContent: "center" }), children: [(0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: qrCodeValue, children: (0, jsx_runtime_1.jsxs)(Button_1.default.Secondary, { className: "gap-1.5 flex items-center", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
346
346
|
fontSize: theme.typography.fontSize12,
|
|
@@ -193,9 +193,10 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
193
193
|
return undefined;
|
|
194
194
|
return +amount - +(estimateFee === null || estimateFee === void 0 ? void 0 : estimateFee.feeInCurrency);
|
|
195
195
|
}, [estimateFee, amount]);
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
var swiperKey = (0, react_1.useMemo)(function () {
|
|
197
|
+
var _a;
|
|
198
|
+
return "".concat((_a = estimateFee === null || estimateFee === void 0 ? void 0 : estimateFee.feeDetail) === null || _a === void 0 ? void 0 : _a.length, "-").concat(amountError, "-").concat(recipientAddressError);
|
|
199
|
+
}, [estimateFee, amountError, recipientAddressError]);
|
|
199
200
|
var clearValues = function () {
|
|
200
201
|
setSelectedToken(undefined);
|
|
201
202
|
setSelectedNetwork(undefined);
|
|
@@ -577,22 +578,22 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
577
578
|
: WITHDRAW_STEP_NAME[currentStep], children: (0, jsx_runtime_1.jsx)(CloseModal_1.default, { sx: { marginLeft: "auto" }, onClick: close }) }), children: [(0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperRef, swiperProps: {
|
|
578
579
|
autoHeight: true,
|
|
579
580
|
spaceBetween: 32,
|
|
580
|
-
}, disableSwipe: true,
|
|
581
|
+
}, disableSwipe: true, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { height: "fit-content" }), children: Object.values(SendMethods).map(function (item, index) {
|
|
581
582
|
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [index !== 0 && (0, jsx_runtime_1.jsx)(material_1.Divider, {}), (0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { title: item, description: item, icon: (0, getIcon_1.default)(item + "_icon"), onClick: function () {
|
|
582
583
|
return handleSelectMethod(item);
|
|
583
584
|
}, sx: {
|
|
584
585
|
my: theme.mixins.customMargin.m12,
|
|
585
586
|
} })] }, item));
|
|
586
|
-
}) }) }), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, height: "fit-content" }), children: withdrawToken === null || withdrawToken === void 0 ? void 0 : withdrawToken.map(function (item) {
|
|
587
|
+
}) }) }, WithdrawStep.SELECT_METHOD), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, height: "fit-content" }), children: withdrawToken === null || withdrawToken === void 0 ? void 0 : withdrawToken.map(function (item) {
|
|
587
588
|
var stringifiedTokenData = JSON.stringify(item);
|
|
588
589
|
if (!item)
|
|
589
590
|
return null;
|
|
590
591
|
return ((0, jsx_runtime_1.jsx)(TokenSelection_1.default, { onClick: handleSelectToken, tokenData: stringifiedTokenData, active: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.id) === item.id }, item.id));
|
|
591
|
-
}) }) }), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: networks === null || networks === void 0 ? void 0 : networks.map(function (item) {
|
|
592
|
+
}) }) }, WithdrawStep.SELECT_TOKEN), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: networks === null || networks === void 0 ? void 0 : networks.map(function (item) {
|
|
592
593
|
if (!item)
|
|
593
594
|
return null;
|
|
594
595
|
return ((0, jsx_runtime_1.jsx)(NetworkSelection_1.default, { onClick: handleSelectNetwork, networkData: JSON.stringify(item), active: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.id) === item.id }, item.id));
|
|
595
|
-
}) }) }), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.fieldTitle), children: "Recipient address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
|
|
596
|
+
}) }) }, WithdrawStep.SELECT_NETWORK), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.fieldTitle), children: "Recipient address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
|
|
596
597
|
paddingRight: theme.mixins.customPadding.p12,
|
|
597
598
|
}, inputRest: {
|
|
598
599
|
placeholder: "Enter recipient address",
|
|
@@ -620,7 +621,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
620
621
|
!selectedToken ||
|
|
621
622
|
isLoadingEstimateFee
|
|
622
623
|
? Button_1.BUTTON_STATUS.DISABLED
|
|
623
|
-
: Button_1.BUTTON_STATUS.ENABLED, children: "Continue" })] }) })] }), (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: {
|
|
624
|
+
: Button_1.BUTTON_STATUS.ENABLED, children: "Continue" })] }) }, 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: {
|
|
624
625
|
textAlign: "center",
|
|
625
626
|
display: "inline-block",
|
|
626
627
|
width: "100%",
|