tek-wallet 0.0.467 → 0.0.469
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.
|
@@ -2,13 +2,14 @@ import { ConfirmLayoutProps } from "../ConfirmLayout";
|
|
|
2
2
|
import { SendExternalBody, SendExternalResponse } from "../../../services/axios/send-external-service/type";
|
|
3
3
|
import { FeesDataType } from "../../../services/axios/get-est-fee-service/type";
|
|
4
4
|
import { NetworkData } from "../../../services/axios/type";
|
|
5
|
-
interface SendExternalDataType extends Omit<SendExternalBody, "network"> {
|
|
5
|
+
interface SendExternalDataType extends Omit<SendExternalBody, "network" | "passcode"> {
|
|
6
6
|
network: NetworkData;
|
|
7
7
|
}
|
|
8
8
|
interface SendExternalTokenProps extends Omit<ConfirmLayoutProps, "action"> {
|
|
9
9
|
sendExternalData: SendExternalDataType;
|
|
10
10
|
onSuccess?: (data: SendExternalResponse) => any;
|
|
11
11
|
initFeeData?: FeesDataType;
|
|
12
|
+
onStart?: () => void;
|
|
12
13
|
}
|
|
13
14
|
export interface SendExternalTokenRef {
|
|
14
15
|
open: () => void;
|
|
@@ -184,7 +184,7 @@ var SendExternalToken = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
184
184
|
_c.trys.push([0, 2, , 3]);
|
|
185
185
|
console.warn("🚀 ~ handleSendExternalToken ~ sendExternalData:", props.sendExternalData, passcode);
|
|
186
186
|
setButtonStatus(Button_1.BUTTON_STATUS.LOADING);
|
|
187
|
-
return [4 /*yield*/, (0, send_external_service_1.default)(__assign(__assign({}, props.sendExternalData), { network: network === null || network === void 0 ? void 0 : network.slug }))];
|
|
187
|
+
return [4 /*yield*/, (0, send_external_service_1.default)(__assign(__assign({}, props.sendExternalData), { network: network === null || network === void 0 ? void 0 : network.slug, passcode: passcode }))];
|
|
188
188
|
case 1:
|
|
189
189
|
response = _c.sent();
|
|
190
190
|
console.warn("🚀 ~ handleSendExternalToken ~ response:", response);
|
|
@@ -680,10 +680,9 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
680
680
|
amount: "".concat(amount),
|
|
681
681
|
currency_slug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "",
|
|
682
682
|
to_address: recipientAddress || "",
|
|
683
|
-
passcode: "",
|
|
684
683
|
network: selectedNetwork,
|
|
685
684
|
memo: memo || "",
|
|
686
|
-
}, children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { children: "Send externally" }) }), (0, jsx_runtime_1.jsx)(ConfirmLayout_1.default, { ref: confirmLayoutDrawerRef, action: type_1.ActionConfirm.SEND, trigger: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, {
|
|
685
|
+
}, onSuccess: close, children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { width: "100%" }, children: "Send externally" }) }), selectedMethod === SendMethods.TRANSFER_INTERNAL && ((0, jsx_runtime_1.jsx)(ConfirmLayout_1.default, { ref: confirmLayoutDrawerRef, action: type_1.ActionConfirm.SEND, trigger: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { status: !!amountError ||
|
|
687
686
|
!!recipientAddressError ||
|
|
688
687
|
!recipientAddress ||
|
|
689
688
|
!amount ||
|
|
@@ -693,10 +692,10 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
693
692
|
? Button_1.BUTTON_STATUS.DISABLED
|
|
694
693
|
: Button_1.BUTTON_STATUS.ENABLED, children: "Continue" }), 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)(material_1.Box, { sx: __assign({}, theme.mixins.paper), children: [(0, jsx_runtime_1.jsx)(LineValue_1.default, { field: "Recipient address", value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
695
694
|
wordBreak: "break-all",
|
|
696
|
-
}, children: recipientAddress }) }),
|
|
695
|
+
}, children: recipientAddress }) }), (0, jsx_runtime_1.jsx)(LineValue_1.default, { field: "Amount", value: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amount, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) }) }), !!((_b = estimateFee === null || estimateFee === void 0 ? void 0 : estimateFee.feeDetail) === null || _b === void 0 ? void 0 : _b.length) && !!amount && ((0, jsx_runtime_1.jsx)(Fees_1.default, { feesData: JSON.stringify(estimateFee), amount: +amount })), (0, jsx_runtime_1.jsx)(LineValue_1.default, { field: "Receive amount estimated", value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
697
696
|
fontWeight: theme.typography.fontWeight600,
|
|
698
697
|
fontSize: theme.typography.fontSize16,
|
|
699
|
-
}, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: estimateReceive, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) }) }) })] }), (0, jsx_runtime_1.jsx)(ConfirmByPasscode_1.default, { action: type_1.ActionConfirm.SEND, onConfirmSuccess: handleSend, children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { status: sendButtonStatus, sx: { width: "100%" }, children: "Confirm" }) })] }) })] }) }, 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: {
|
|
698
|
+
}, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: estimateReceive, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) }) }) })] }), (0, jsx_runtime_1.jsx)(ConfirmByPasscode_1.default, { action: type_1.ActionConfirm.SEND, onConfirmSuccess: handleSend, children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { status: sendButtonStatus, sx: { width: "100%" }, children: "Confirm" }) })] }) }))] }) }, 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: {
|
|
700
699
|
textAlign: "center",
|
|
701
700
|
display: "inline-block",
|
|
702
701
|
width: "100%",
|