tek-wallet 0.0.347 → 0.0.350
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.
|
@@ -188,6 +188,10 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
188
188
|
setHiddenError(true);
|
|
189
189
|
setRecipientAddressError(undefined);
|
|
190
190
|
};
|
|
191
|
+
var handleClearRecipientAddress = function () {
|
|
192
|
+
setRecipientAddress("");
|
|
193
|
+
setRecipientAddressError("The recipient address is required");
|
|
194
|
+
};
|
|
191
195
|
var gotoStep = function (step) {
|
|
192
196
|
var _a;
|
|
193
197
|
if (step === WithdrawStep.SELECT_METHOD) {
|
|
@@ -368,6 +372,9 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
368
372
|
})];
|
|
369
373
|
case 1:
|
|
370
374
|
validateWalletAddress = _b.sent();
|
|
375
|
+
if (!!(validateWalletAddress === null || validateWalletAddress === void 0 ? void 0 : validateWalletAddress.valid)) {
|
|
376
|
+
setRecipientAddressError(undefined);
|
|
377
|
+
}
|
|
371
378
|
if (!!(validateWalletAddress === null || validateWalletAddress === void 0 ? void 0 : validateWalletAddress.master_wallet_address)) {
|
|
372
379
|
setRecipientAddressInternal(validateWalletAddress === null || validateWalletAddress === void 0 ? void 0 : validateWalletAddress.master_wallet_address);
|
|
373
380
|
(_a = suggestUseTransferInternalDialogRef.current) === null || _a === void 0 ? void 0 : _a.open();
|
|
@@ -378,7 +385,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
378
385
|
console.warn("external");
|
|
379
386
|
}
|
|
380
387
|
else {
|
|
381
|
-
setInfoDialogContent("Unsupported QR");
|
|
388
|
+
// setInfoDialogContent("Unsupported QR");
|
|
382
389
|
setRecipientAddressError("Invalid wallet address");
|
|
383
390
|
}
|
|
384
391
|
return [2 /*return*/];
|
|
@@ -414,6 +421,9 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
414
421
|
// if(validateWalletAddress?.is_current_wallet) {
|
|
415
422
|
// return
|
|
416
423
|
// }
|
|
424
|
+
if (!!(validateWalletAddress === null || validateWalletAddress === void 0 ? void 0 : validateWalletAddress.valid)) {
|
|
425
|
+
setRecipientAddressError(undefined);
|
|
426
|
+
}
|
|
417
427
|
if (!!(validateWalletAddress === null || validateWalletAddress === void 0 ? void 0 : validateWalletAddress.master_wallet_address)) {
|
|
418
428
|
//internal
|
|
419
429
|
console.warn("internal");
|
|
@@ -476,7 +486,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
476
486
|
placeholder: "Enter recipient address",
|
|
477
487
|
value: recipientAddress,
|
|
478
488
|
onChange: handleChangeRecipientAddress,
|
|
479
|
-
}, rightPart: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: [!!recipientAddress && ((0, jsx_runtime_1.jsx)(Button_1.default.Secondary, { sx: __assign(__assign({}, theme.mixins.smallButton), { color: theme.palette.text.warningStatus }), onClick:
|
|
489
|
+
}, rightPart: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: [!!recipientAddress && ((0, jsx_runtime_1.jsx)(Button_1.default.Secondary, { sx: __assign(__assign({}, theme.mixins.smallButton), { color: theme.palette.text.warningStatus }), onClick: handleClearRecipientAddress, children: "Clear" })), !recipientAddress && ((0, jsx_runtime_1.jsx)(Button_1.default.Secondary, { sx: __assign({}, theme.mixins.smallButton), children: "Paste" })), (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", variant: "middle", flexItem: true }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("qr_can"), width: 20 })] }) }), !!recipientAddressError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: recipientAddressError }))] }), selectedMethod === SendMethods.TRANSFER_EXTERNAL && ((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: "Network" }), (0, jsx_runtime_1.jsxs)(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)(Icon_1.default, { width: 20, src: selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.icon }), (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, { width: 10, src: (0, getIcon_1.default)("right_arrow") })] })] })), (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: "Amount" }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
|
|
480
490
|
paddingRight: theme.mixins.customPadding.p12,
|
|
481
491
|
}, inputRest: {
|
|
482
492
|
placeholder: "".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.min_value, " - ").concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.max_value, " ").concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name),
|