tek-wallet 0.0.398 → 0.0.399
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.
|
@@ -40,7 +40,7 @@ Button.displayName = "Button";
|
|
|
40
40
|
Button.Primary = function (props) {
|
|
41
41
|
var sx = props.sx, children = props.children, rest = __rest(props, ["sx", "children"]);
|
|
42
42
|
var theme = (0, material_1.useTheme)();
|
|
43
|
-
return ((0, jsx_runtime_1.jsx)(Button, __assign({}, rest, { variant: "contained", color: "primary", sx: __assign({ borderRadius: theme.mixins.theBorderRadius.full, "
|
|
43
|
+
return ((0, jsx_runtime_1.jsx)(Button, __assign({}, rest, { variant: "contained", color: "primary", sx: __assign({ borderRadius: theme.mixins.theBorderRadius.full, "& .Mui-disabled": {
|
|
44
44
|
backgroundColor: theme.palette.background.white16,
|
|
45
45
|
color: theme.palette.text.white24,
|
|
46
46
|
} }, sx), children: children })));
|
|
@@ -168,8 +168,9 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
168
168
|
var _o = (0, react_1.useState)(), selectedMethod = _o[0], setSelectedMethod = _o[1];
|
|
169
169
|
var _p = (0, react_1.useState)(), sendInfoGet = _p[0], setSendInfoGet = _p[1];
|
|
170
170
|
var _q = (0, react_1.useState)(false), isLoadingEstimateFee = _q[0], setIsLoadingEstimateFee = _q[1];
|
|
171
|
-
var _r = (0, react_1.useState)(),
|
|
172
|
-
var _s = (0, react_1.useState)(),
|
|
171
|
+
var _r = (0, react_1.useState)(false), isValidatingAddress = _r[0], setIsValidatingAddress = _r[1];
|
|
172
|
+
var _s = (0, react_1.useState)(), estimateFee = _s[0], setEstimateFee = _s[1];
|
|
173
|
+
var _t = (0, react_1.useState)(), recipientAddressError = _t[0], setRecipientAddressError = _t[1];
|
|
173
174
|
var onlyChangeAddress = (0, react_1.useRef)(false);
|
|
174
175
|
var withdrawToken = (0, react_1.useMemo)(function () {
|
|
175
176
|
return selectedMethod === SendMethods.TRANSFER_EXTERNAL
|
|
@@ -412,13 +413,14 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
412
413
|
return __generator(this, function (_b) {
|
|
413
414
|
switch (_b.label) {
|
|
414
415
|
case 0:
|
|
415
|
-
|
|
416
|
+
setIsValidatingAddress(true);
|
|
416
417
|
return [4 /*yield*/, (0, validate_wallet_address_service_1.default)({
|
|
417
418
|
address: address,
|
|
418
419
|
network: network,
|
|
419
420
|
})];
|
|
420
421
|
case 1:
|
|
421
422
|
validateWalletAddress = _b.sent();
|
|
423
|
+
setIsValidatingAddress(false);
|
|
422
424
|
if (!!(validateWalletAddress === null || validateWalletAddress === void 0 ? void 0 : validateWalletAddress.valid)) {
|
|
423
425
|
setRecipientAddressError(undefined);
|
|
424
426
|
}
|
|
@@ -619,7 +621,8 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
619
621
|
!recipientAddress ||
|
|
620
622
|
!amount ||
|
|
621
623
|
!selectedToken ||
|
|
622
|
-
isLoadingEstimateFee
|
|
624
|
+
isLoadingEstimateFee ||
|
|
625
|
+
isValidatingAddress
|
|
623
626
|
? Button_1.BUTTON_STATUS.DISABLED
|
|
624
627
|
: Button_1.BUTTON_STATUS.ENABLED, children: "Continue" })] }) }, WithdrawStep.FORM)] }), (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: {
|
|
625
628
|
textAlign: "center",
|