tek-wallet 0.0.822 → 0.0.823
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.
- package/dist/components/TekWallet/components/ui/AssetsBoard/index.js +1 -0
- package/dist/components/TekWallet/components/ui/Input/ClearInput.d.ts +5 -0
- package/dist/components/TekWallet/components/ui/{WithdrawFunction/components/tutorial.js → Input/ClearInput.js} +5 -9
- package/dist/components/TekWallet/components/ui/Input/PasteInput.d.ts +5 -0
- package/dist/components/TekWallet/components/ui/{WithdrawFunction/components/transferHistory.js → Input/PasteInput.js} +5 -9
- package/dist/components/TekWallet/components/ui/Input/QrScan.d.ts +5 -0
- package/dist/components/TekWallet/components/ui/Input/QrScan.js +31 -0
- package/dist/components/TekWallet/components/ui/Input/index.d.ts +12 -10
- package/dist/components/TekWallet/components/ui/Input/index.js +120 -19
- package/dist/components/TekWallet/components/ui/Input/index_bk.d.ts +10 -0
- package/dist/components/TekWallet/components/ui/Input/index_bk.js +46 -0
- package/dist/components/TekWallet/components/ui/QrCodeReader/index.d.ts +2 -1
- package/dist/components/TekWallet/components/ui/QrCodeReader/index.js +10 -3
- package/dist/components/TekWallet/components/views/SendExternalView/components/Form.js +54 -77
- package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +24 -68
- package/dist/components/TekWallet/components/views/SendNftView/components/Form.js +19 -65
- package/dist/components/TekWallet/index.d.ts +1 -0
- package/dist/components/TekWallet/index.js +1 -0
- package/dist/components/TekWallet/providers/TanstackReactQuery/index.js +4 -1
- package/package.json +1 -1
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/selectToken.d.ts +0 -13
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/selectToken.js +0 -48
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sendForm.d.ts +0 -29
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sendForm.js +0 -235
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sortByBalance.d.ts +0 -7
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sortByBalance.js +0 -45
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sortByToken.d.ts +0 -7
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sortByToken.js +0 -45
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/summary/infoSummary.d.ts +0 -14
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/summary/infoSummary.js +0 -111
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/transferHistory.d.ts +0 -5
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/tutorial.d.ts +0 -5
- package/dist/components/TekWallet/components/ui/WithdrawFunction/index.d.ts +0 -38
- package/dist/components/TekWallet/components/ui/WithdrawFunction/index.js +0 -570
- package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.d.ts +0 -11
- package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.js +0 -382
- package/dist/components/TekWallet/utils/sort.utils.d.ts +0 -3
- package/dist/components/TekWallet/utils/sort.utils.js +0 -24
|
@@ -96,8 +96,6 @@ var lodash_1 = require("lodash");
|
|
|
96
96
|
var Button_1 = __importStar(require("../../../ui/Button"));
|
|
97
97
|
var expose_1 = require("../../../../services/axios/expose");
|
|
98
98
|
var __1 = require("..");
|
|
99
|
-
var QrCodeReader_1 = __importDefault(require("../../../ui/QrCodeReader"));
|
|
100
|
-
var Icon_1 = __importDefault(require("../../../ui/Icon"));
|
|
101
99
|
var get_est_fee_service_1 = __importDefault(require("../../../../services/axios/get-est-fee-service"));
|
|
102
100
|
var type_1 = require("../../../../services/axios/get-activities-service/type");
|
|
103
101
|
var Fees_1 = __importStar(require("../../../ui/Fees"));
|
|
@@ -125,7 +123,6 @@ function Form(props) {
|
|
|
125
123
|
var _e = (0, react_1.useState)(), amountError = _e[0], setAmountError = _e[1];
|
|
126
124
|
var _f = (0, react_1.useState)(undefined), comment = _f[0], setComment = _f[1];
|
|
127
125
|
var _g = (0, react_1.useState)(false), isValidatingAddress = _g[0], setIsValidatingAddress = _g[1];
|
|
128
|
-
var scannerAddressQrCodeRef = (0, react_1.useRef)(null);
|
|
129
126
|
var _h = (0, react_1.useState)(false), isEstimatingFee = _h[0], setIsLoadingEstimateFee = _h[1];
|
|
130
127
|
var _j = (0, react_1.useState)(), estimateFee = _j[0], setEstimateFee = _j[1];
|
|
131
128
|
var _k = (0, react_1.useState)(false), isEnoughBalanceToPayFee = _k[0], setIsEnoughBalanceToPayFee = _k[1];
|
|
@@ -226,29 +223,6 @@ function Form(props) {
|
|
|
226
223
|
setRecipientAddress(address);
|
|
227
224
|
validateAddress(address);
|
|
228
225
|
};
|
|
229
|
-
var handlePaste = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
230
|
-
var text, address;
|
|
231
|
-
return __generator(this, function (_a) {
|
|
232
|
-
switch (_a.label) {
|
|
233
|
-
case 0: return [4 /*yield*/, navigator.clipboard.readText()];
|
|
234
|
-
case 1:
|
|
235
|
-
text = _a.sent();
|
|
236
|
-
address = text.trim();
|
|
237
|
-
if (!address) {
|
|
238
|
-
return [2 /*return*/];
|
|
239
|
-
}
|
|
240
|
-
handleChangeRecipientAddress({
|
|
241
|
-
target: { value: address },
|
|
242
|
-
});
|
|
243
|
-
return [2 /*return*/];
|
|
244
|
-
}
|
|
245
|
-
});
|
|
246
|
-
}); };
|
|
247
|
-
var handleClearRecipientAddress = function () {
|
|
248
|
-
handleChangeRecipientAddress({
|
|
249
|
-
target: { value: "" },
|
|
250
|
-
});
|
|
251
|
-
};
|
|
252
226
|
var handleChangeAmount = function (e) {
|
|
253
227
|
var amount = e.target.value;
|
|
254
228
|
setAmount(amount);
|
|
@@ -279,37 +253,18 @@ function Form(props) {
|
|
|
279
253
|
message: comment,
|
|
280
254
|
}, estimateFee);
|
|
281
255
|
};
|
|
282
|
-
var
|
|
283
|
-
var
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
256
|
+
var sanitizeScanText = function (text) {
|
|
257
|
+
var address = "";
|
|
258
|
+
var isReceiveInternal = text === null || text === void 0 ? void 0 : text.includes("isTekWalletReceiveInternal");
|
|
259
|
+
if (isReceiveInternal) {
|
|
260
|
+
var data = JSON.parse(text);
|
|
261
|
+
address = data === null || data === void 0 ? void 0 : data.address;
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
address = text;
|
|
265
|
+
}
|
|
266
|
+
return address;
|
|
289
267
|
};
|
|
290
|
-
var handleScanAddressQrCode = function (result) { return __awaiter(_this, void 0, void 0, function () {
|
|
291
|
-
var text, address, isReceiveInternal, data;
|
|
292
|
-
var _a;
|
|
293
|
-
return __generator(this, function (_b) {
|
|
294
|
-
closeScannerAddressQrCode();
|
|
295
|
-
text = (_a = result === null || result === void 0 ? void 0 : result[0]) === null || _a === void 0 ? void 0 : _a.rawValue;
|
|
296
|
-
address = "";
|
|
297
|
-
isReceiveInternal = text === null || text === void 0 ? void 0 : text.includes("isTekWalletReceiveInternal");
|
|
298
|
-
if (isReceiveInternal) {
|
|
299
|
-
data = JSON.parse(text);
|
|
300
|
-
address = data === null || data === void 0 ? void 0 : data.address;
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
address = text;
|
|
304
|
-
}
|
|
305
|
-
if (!address)
|
|
306
|
-
return [2 /*return*/];
|
|
307
|
-
handleChangeRecipientAddress({
|
|
308
|
-
target: { value: address },
|
|
309
|
-
});
|
|
310
|
-
return [2 /*return*/];
|
|
311
|
-
});
|
|
312
|
-
}); };
|
|
313
268
|
var keyboardId = (0, useUniqueId_1.useUniqueId)("form-keyboard");
|
|
314
269
|
var handleKeyboardOpen = function () {
|
|
315
270
|
setIsKeyboardOpen(true);
|
|
@@ -337,13 +292,13 @@ function Form(props) {
|
|
|
337
292
|
fontSize: theme.typography.fontSize14,
|
|
338
293
|
color: theme.palette.text.primary,
|
|
339
294
|
fontWeight: theme.typography.fontWeight700,
|
|
340
|
-
}, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
},
|
|
295
|
+
}, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { slotProps: {
|
|
296
|
+
input: {
|
|
297
|
+
placeholder: "Enter recipient address",
|
|
298
|
+
value: recipientAddress,
|
|
299
|
+
onChange: handleChangeRecipientAddress,
|
|
300
|
+
},
|
|
301
|
+
}, canClear: true, canPaste: true, canScan: true, sanitizeScanText: sanitizeScanText }), !!recipientAddressError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.validationError), children: recipientAddressError }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8, alignItems: "center", justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
347
302
|
fontSize: theme.typography.fontSize14,
|
|
348
303
|
color: theme.palette.text.primary,
|
|
349
304
|
fontWeight: theme.typography.fontWeight700,
|
|
@@ -372,11 +327,12 @@ function Form(props) {
|
|
|
372
327
|
fontSize: theme.typography.fontSize14,
|
|
373
328
|
color: theme.palette.text.primary,
|
|
374
329
|
fontWeight: theme.typography.fontWeight700,
|
|
375
|
-
}, children: "Message" }), (0, jsx_runtime_1.jsx)(Input_1.default, {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
330
|
+
}, children: "Message" }), (0, jsx_runtime_1.jsx)(Input_1.default, { value: comment, slotProps: {
|
|
331
|
+
input: {
|
|
332
|
+
placeholder: "Enter comment if needed",
|
|
333
|
+
onChange: handleChangeComment,
|
|
334
|
+
},
|
|
335
|
+
}, canClear: true, canPaste: true })] }), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: estimateFee, amount: +amount, tokenSlug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "", feesStyle: Fees_1.FeesStyle.WITH_BACKGROUND, setIsEnoughBalanceToPayFee: setIsEnoughBalanceToPayFee }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { loading: isValidatingAddress || isEstimatingFee, onClick: handleContinue, status: !recipientAddress ||
|
|
380
336
|
!amount ||
|
|
381
337
|
!!recipientAddressError ||
|
|
382
338
|
!!amountError ||
|
|
@@ -87,7 +87,6 @@ exports.default = Form;
|
|
|
87
87
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
88
88
|
var material_1 = require("@mui/material");
|
|
89
89
|
var Input_1 = __importDefault(require("../../../ui/Input"));
|
|
90
|
-
var SvgPath_1 = require("../../../ui/SvgPath");
|
|
91
90
|
var Text_1 = __importDefault(require("../../../ui/Text"));
|
|
92
91
|
var mui_1 = require("../../../../theme/mui");
|
|
93
92
|
var react_1 = require("react");
|
|
@@ -95,8 +94,6 @@ var validate_wallet_address_service_1 = __importDefault(require("../../../../ser
|
|
|
95
94
|
var lodash_1 = require("lodash");
|
|
96
95
|
var Button_1 = __importStar(require("../../../ui/Button"));
|
|
97
96
|
var expose_1 = require("../../../../services/axios/expose");
|
|
98
|
-
var QrCodeReader_1 = __importDefault(require("../../../ui/QrCodeReader"));
|
|
99
|
-
var Icon_1 = __importDefault(require("../../../ui/Icon"));
|
|
100
97
|
var ChildPageLayout_1 = __importDefault(require("../../../layouts/ChildPageLayout"));
|
|
101
98
|
var navigation_1 = require("next/navigation");
|
|
102
99
|
var react_2 = require("motion/react");
|
|
@@ -115,7 +112,6 @@ function Form(props) {
|
|
|
115
112
|
var _a = (0, react_1.useState)(""), recipientAddress = _a[0], setRecipientAddress = _a[1];
|
|
116
113
|
var _b = (0, react_1.useState)(), recipientAddressError = _b[0], setRecipientAddressError = _b[1];
|
|
117
114
|
var _c = (0, react_1.useState)(false), isValidatingAddress = _c[0], setIsValidatingAddress = _c[1];
|
|
118
|
-
var scannerAddressQrCodeRef = (0, react_1.useRef)(null);
|
|
119
115
|
var selectedNetwork = (0, useNft_1.default)(nftId).network;
|
|
120
116
|
var validateAddress = function (address) {
|
|
121
117
|
if (!address) {
|
|
@@ -171,52 +167,18 @@ function Form(props) {
|
|
|
171
167
|
setRecipientAddress(address);
|
|
172
168
|
validateAddress(address);
|
|
173
169
|
};
|
|
174
|
-
var
|
|
175
|
-
var
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
handleChangeRecipientAddress({
|
|
186
|
-
target: { value: address },
|
|
187
|
-
});
|
|
188
|
-
return [2 /*return*/];
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
}); };
|
|
192
|
-
var handleClearRecipientAddress = function () {
|
|
193
|
-
handleChangeRecipientAddress({
|
|
194
|
-
target: { value: "" },
|
|
195
|
-
});
|
|
170
|
+
var sanitizeScanText = function (text) {
|
|
171
|
+
var address = "";
|
|
172
|
+
var isReceiveInternal = text === null || text === void 0 ? void 0 : text.includes("isTekWalletReceiveInternal");
|
|
173
|
+
if (isReceiveInternal) {
|
|
174
|
+
var data = JSON.parse(text);
|
|
175
|
+
address = data === null || data === void 0 ? void 0 : data.address;
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
address = text;
|
|
179
|
+
}
|
|
180
|
+
return address;
|
|
196
181
|
};
|
|
197
|
-
var handleScanAddressQrCode = function (result) { return __awaiter(_this, void 0, void 0, function () {
|
|
198
|
-
var text, address, isReceiveInternal, data;
|
|
199
|
-
var _a;
|
|
200
|
-
return __generator(this, function (_b) {
|
|
201
|
-
closeScannerAddressQrCode();
|
|
202
|
-
text = (_a = result === null || result === void 0 ? void 0 : result[0]) === null || _a === void 0 ? void 0 : _a.rawValue;
|
|
203
|
-
address = "";
|
|
204
|
-
isReceiveInternal = text === null || text === void 0 ? void 0 : text.includes("isTekWalletReceiveInternal");
|
|
205
|
-
if (isReceiveInternal) {
|
|
206
|
-
data = JSON.parse(text);
|
|
207
|
-
address = data === null || data === void 0 ? void 0 : data.address;
|
|
208
|
-
}
|
|
209
|
-
else {
|
|
210
|
-
address = text;
|
|
211
|
-
}
|
|
212
|
-
if (!address)
|
|
213
|
-
return [2 /*return*/];
|
|
214
|
-
handleChangeRecipientAddress({
|
|
215
|
-
target: { value: address },
|
|
216
|
-
});
|
|
217
|
-
return [2 /*return*/];
|
|
218
|
-
});
|
|
219
|
-
}); };
|
|
220
182
|
var handleContinue = function () {
|
|
221
183
|
if (!selectedNetwork)
|
|
222
184
|
return;
|
|
@@ -225,14 +187,6 @@ function Form(props) {
|
|
|
225
187
|
network: selectedNetwork,
|
|
226
188
|
});
|
|
227
189
|
};
|
|
228
|
-
var openScannerAddressQrCode = function () {
|
|
229
|
-
var _a;
|
|
230
|
-
(_a = scannerAddressQrCodeRef.current) === null || _a === void 0 ? void 0 : _a.open();
|
|
231
|
-
};
|
|
232
|
-
var closeScannerAddressQrCode = function () {
|
|
233
|
-
var _a;
|
|
234
|
-
(_a = scannerAddressQrCodeRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
235
|
-
};
|
|
236
190
|
(0, react_1.useEffect)(function () {
|
|
237
191
|
if (address) {
|
|
238
192
|
handleChangeRecipientAddress({
|
|
@@ -251,14 +205,14 @@ function Form(props) {
|
|
|
251
205
|
fontSize: theme.typography.fontSize14,
|
|
252
206
|
color: theme.palette.text.primary,
|
|
253
207
|
fontWeight: theme.typography.fontWeight700,
|
|
254
|
-
}, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
},
|
|
208
|
+
}, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { slotProps: {
|
|
209
|
+
input: {
|
|
210
|
+
placeholder: "Enter recipient address",
|
|
211
|
+
value: recipientAddress,
|
|
212
|
+
onChange: handleChangeRecipientAddress,
|
|
213
|
+
id: "recipient-address-input-id",
|
|
214
|
+
},
|
|
215
|
+
}, canClear: true, canPaste: true, canScan: true, sanitizeScanText: sanitizeScanText }), !!recipientAddressError && !isValidatingAddress && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.validationError), children: recipientAddressError }))] }), (0, jsx_runtime_1.jsx)(ConfirmSendNft_1.default, { payload: payload, sx: { width: "100%", marginTop: "auto" }, childrenRender: function (isSendingNft) { return ((0, jsx_runtime_1.jsx)(Button_1.default.Primary, { fullWidth: true, loading: isValidatingAddress || isSendingNft, onClick: handleContinue, status: !recipientAddress ||
|
|
262
216
|
!selectedNetwork ||
|
|
263
217
|
!!recipientAddressError ||
|
|
264
218
|
!nftId ||
|
|
@@ -31,3 +31,4 @@ __exportStar(require("./providers/TekWalletProvider"), exports);
|
|
|
31
31
|
__exportStar(require("./components/ui/UpdateLockToken"), exports);
|
|
32
32
|
__exportStar(require("./theme/mui/palette"), exports);
|
|
33
33
|
__exportStar(require("./theme/mui/utils/deepMergeTheme"), exports);
|
|
34
|
+
__exportStar(require("./handlers"), exports);
|
|
@@ -16,7 +16,10 @@ function TanstackReactQuery(_a) {
|
|
|
16
16
|
if (typeof window === "undefined") {
|
|
17
17
|
return undefined;
|
|
18
18
|
}
|
|
19
|
-
return (0, query_sync_storage_persister_1.createSyncStoragePersister)({
|
|
19
|
+
return (0, query_sync_storage_persister_1.createSyncStoragePersister)({
|
|
20
|
+
storage: window.localStorage,
|
|
21
|
+
key: "tek-wallet-react-query-cache",
|
|
22
|
+
});
|
|
20
23
|
}, []);
|
|
21
24
|
if (!persister) {
|
|
22
25
|
return (0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: query_config_1.queryClient, children: children });
|
package/package.json
CHANGED
package/dist/components/TekWallet/components/ui/WithdrawFunction/components/selectToken.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SortBalance, SortToken } from "..";
|
|
2
|
-
import { WithdrawCurrency } from "../../../../services/axios/get-withdraw-tokens-list-service/type";
|
|
3
|
-
interface SelectTokenProps {
|
|
4
|
-
sortToken?: SortToken;
|
|
5
|
-
setSortToken?: (sortToken: SortToken) => void;
|
|
6
|
-
sortBalance?: SortBalance;
|
|
7
|
-
setSortBalance?: (sortBalance: SortBalance) => void;
|
|
8
|
-
withdrawToken?: WithdrawCurrency[];
|
|
9
|
-
selectedToken?: WithdrawCurrency;
|
|
10
|
-
handleSelectToken?: (token: WithdrawCurrency) => void;
|
|
11
|
-
}
|
|
12
|
-
export default function SelectToken(props: SelectTokenProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export type { SelectTokenProps };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = SelectToken;
|
|
7
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
var material_1 = require("@mui/material");
|
|
9
|
-
var Column_1 = __importDefault(require("../../Column"));
|
|
10
|
-
var sortByToken_1 = __importDefault(require("./sortByToken"));
|
|
11
|
-
var sortByBalance_1 = __importDefault(require("./sortByBalance"));
|
|
12
|
-
var __1 = require("..");
|
|
13
|
-
var TokenSelection_1 = __importDefault(require("../../TokenSelection"));
|
|
14
|
-
var SvgPath_1 = require("../../SvgPath");
|
|
15
|
-
var mui_1 = require("../../../../theme/mui");
|
|
16
|
-
function SelectToken(props) {
|
|
17
|
-
var theme = (0, mui_1.useTheme)();
|
|
18
|
-
var sortToken = props.sortToken, setSortToken = props.setSortToken, sortBalance = props.sortBalance, setSortBalance = props.setSortBalance, withdrawToken = props.withdrawToken, selectedToken = props.selectedToken, handleSelectToken = props.handleSelectToken;
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)(Column_1.default, { sx: {
|
|
20
|
-
gap: theme.styleMixins.gaps.g12,
|
|
21
|
-
height: "fit-content",
|
|
22
|
-
}, children: [(0, jsx_runtime_1.jsx)(material_1.InputBase, { startAdornment: (0, jsx_runtime_1.jsx)(material_1.InputAdornment, { className: "size-5 text-black", position: "start", children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { inheritViewBox: true, sx: {
|
|
23
|
-
width: 20,
|
|
24
|
-
height: 20,
|
|
25
|
-
transition: "opacity 0.2s ease-in-out",
|
|
26
|
-
}, children: SvgPath_1.IC_SEARCH }) }), placeholder: "Search", className: "w-full flex items-center py-1 px-2", sx: {
|
|
27
|
-
borderRadius: theme.styleMixins.customRadius.r12,
|
|
28
|
-
border: "1px solid",
|
|
29
|
-
borderColor: theme.palette.divider,
|
|
30
|
-
background: theme.palette.background.default,
|
|
31
|
-
color: theme.palette.text.primary,
|
|
32
|
-
"input::placeholder": {
|
|
33
|
-
fontSize: theme.typography.fontSize11,
|
|
34
|
-
pl: theme.styleMixins.customPadding.p4,
|
|
35
|
-
fontWeight: theme.typography.fontWeight500,
|
|
36
|
-
color: theme.palette.text.primary,
|
|
37
|
-
},
|
|
38
|
-
} }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
39
|
-
display: theme.styleMixins.row,
|
|
40
|
-
justifyContent: "space-between",
|
|
41
|
-
mt: theme.styleMixins.customMargin.m16,
|
|
42
|
-
}, children: [(0, jsx_runtime_1.jsx)(sortByToken_1.default, { sortToken: sortToken || __1.SortToken.ASC, setSortToken: setSortToken || (function () { }) }), (0, jsx_runtime_1.jsx)(sortByBalance_1.default, { sortBalance: sortBalance || __1.SortBalance.ASC, setSortBalance: setSortBalance || (function () { }) })] }), withdrawToken === null || withdrawToken === void 0 ? void 0 : withdrawToken.map(function (item) {
|
|
43
|
-
var stringifiedTokenData = JSON.stringify(item);
|
|
44
|
-
if (!item)
|
|
45
|
-
return null;
|
|
46
|
-
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));
|
|
47
|
-
})] }));
|
|
48
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { WithdrawCurrency } from "../../../../services/axios/get-withdraw-tokens-list-service/type";
|
|
2
|
-
import { FeesDataType } from "../../../../services/axios/get-est-fee-service/type";
|
|
3
|
-
import { SendMethods } from "..";
|
|
4
|
-
interface SendFormProps {
|
|
5
|
-
recipientAddress?: string;
|
|
6
|
-
recipientAddressError?: string;
|
|
7
|
-
selectedToken?: WithdrawCurrency;
|
|
8
|
-
amount?: string | number;
|
|
9
|
-
comment?: string;
|
|
10
|
-
amountError?: number;
|
|
11
|
-
amountErrorMessage?: string;
|
|
12
|
-
hiddenError?: boolean;
|
|
13
|
-
selectedMethod?: SendMethods;
|
|
14
|
-
memo?: string;
|
|
15
|
-
estimateFee?: FeesDataType;
|
|
16
|
-
estimateReceive?: string | number;
|
|
17
|
-
isLoadingEstimateFee?: boolean;
|
|
18
|
-
handleChangeRecipientAddress?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
19
|
-
handleClearRecipientAddress?: () => void;
|
|
20
|
-
handleChangeAmount?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
21
|
-
handleClickMaxAmount?: () => void;
|
|
22
|
-
handleChangeComment?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
23
|
-
handleChangeMemo?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
24
|
-
openScannerAddressQrCode?: () => void;
|
|
25
|
-
setRecipientAddress?: (address: string) => void;
|
|
26
|
-
setRecipientAddressError?: (error: string | undefined) => void;
|
|
27
|
-
}
|
|
28
|
-
export default function SendForm(props: SendFormProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export type { SendFormProps };
|