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.
Files changed (38) hide show
  1. package/dist/components/TekWallet/components/ui/AssetsBoard/index.js +1 -0
  2. package/dist/components/TekWallet/components/ui/Input/ClearInput.d.ts +5 -0
  3. package/dist/components/TekWallet/components/ui/{WithdrawFunction/components/tutorial.js → Input/ClearInput.js} +5 -9
  4. package/dist/components/TekWallet/components/ui/Input/PasteInput.d.ts +5 -0
  5. package/dist/components/TekWallet/components/ui/{WithdrawFunction/components/transferHistory.js → Input/PasteInput.js} +5 -9
  6. package/dist/components/TekWallet/components/ui/Input/QrScan.d.ts +5 -0
  7. package/dist/components/TekWallet/components/ui/Input/QrScan.js +31 -0
  8. package/dist/components/TekWallet/components/ui/Input/index.d.ts +12 -10
  9. package/dist/components/TekWallet/components/ui/Input/index.js +120 -19
  10. package/dist/components/TekWallet/components/ui/Input/index_bk.d.ts +10 -0
  11. package/dist/components/TekWallet/components/ui/Input/index_bk.js +46 -0
  12. package/dist/components/TekWallet/components/ui/QrCodeReader/index.d.ts +2 -1
  13. package/dist/components/TekWallet/components/ui/QrCodeReader/index.js +10 -3
  14. package/dist/components/TekWallet/components/views/SendExternalView/components/Form.js +54 -77
  15. package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +24 -68
  16. package/dist/components/TekWallet/components/views/SendNftView/components/Form.js +19 -65
  17. package/dist/components/TekWallet/index.d.ts +1 -0
  18. package/dist/components/TekWallet/index.js +1 -0
  19. package/dist/components/TekWallet/providers/TanstackReactQuery/index.js +4 -1
  20. package/package.json +1 -1
  21. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/selectToken.d.ts +0 -13
  22. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/selectToken.js +0 -48
  23. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sendForm.d.ts +0 -29
  24. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sendForm.js +0 -235
  25. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sortByBalance.d.ts +0 -7
  26. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sortByBalance.js +0 -45
  27. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sortByToken.d.ts +0 -7
  28. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sortByToken.js +0 -45
  29. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/summary/infoSummary.d.ts +0 -14
  30. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/summary/infoSummary.js +0 -111
  31. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/transferHistory.d.ts +0 -5
  32. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/tutorial.d.ts +0 -5
  33. package/dist/components/TekWallet/components/ui/WithdrawFunction/index.d.ts +0 -38
  34. package/dist/components/TekWallet/components/ui/WithdrawFunction/index.js +0 -570
  35. package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.d.ts +0 -11
  36. package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.js +0 -382
  37. package/dist/components/TekWallet/utils/sort.utils.d.ts +0 -3
  38. package/dist/components/TekWallet/utils/sort.utils.js +0 -24
@@ -1,235 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || (function () {
30
- var ownKeys = function(o) {
31
- ownKeys = Object.getOwnPropertyNames || function (o) {
32
- var ar = [];
33
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
- return ar;
35
- };
36
- return ownKeys(o);
37
- };
38
- return function (mod) {
39
- if (mod && mod.__esModule) return mod;
40
- var result = {};
41
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
- __setModuleDefault(result, mod);
43
- return result;
44
- };
45
- })();
46
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
47
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
48
- return new (P || (P = Promise))(function (resolve, reject) {
49
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
50
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
51
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
52
- step((generator = generator.apply(thisArg, _arguments || [])).next());
53
- });
54
- };
55
- var __generator = (this && this.__generator) || function (thisArg, body) {
56
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
57
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
58
- function verb(n) { return function (v) { return step([n, v]); }; }
59
- function step(op) {
60
- if (f) throw new TypeError("Generator is already executing.");
61
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
62
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
63
- if (y = 0, t) op = [op[0] & 2, t.value];
64
- switch (op[0]) {
65
- case 0: case 1: t = op; break;
66
- case 4: _.label++; return { value: op[1], done: false };
67
- case 5: _.label++; y = op[1]; op = [0]; continue;
68
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
69
- default:
70
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
71
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
72
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
73
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
74
- if (t[2]) _.ops.pop();
75
- _.trys.pop(); continue;
76
- }
77
- op = body.call(thisArg, _);
78
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
79
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
80
- }
81
- };
82
- var __importDefault = (this && this.__importDefault) || function (mod) {
83
- return (mod && mod.__esModule) ? mod : { "default": mod };
84
- };
85
- Object.defineProperty(exports, "__esModule", { value: true });
86
- exports.default = SendForm;
87
- var jsx_runtime_1 = require("react/jsx-runtime");
88
- var material_1 = require("@mui/material");
89
- var Button_1 = __importStar(require("../../Button"));
90
- var Input_1 = __importDefault(require("../../Input"));
91
- var Formatter_1 = __importDefault(require("../../Formatter"));
92
- var Fees_1 = __importStar(require("../../Fees"));
93
- var SvgPath_1 = require("../../SvgPath");
94
- var Text_1 = __importDefault(require("../../Text"));
95
- var react_1 = require("react");
96
- var TransferInternal_1 = __importDefault(require("../../TransferInternal"));
97
- var type_1 = require("../../../../services/axios/get-activities-service/type");
98
- var Column_1 = __importDefault(require("../../Column"));
99
- var infoSummary_1 = __importDefault(require("./summary/infoSummary"));
100
- var __1 = require("..");
101
- var mui_1 = require("../../../../theme/mui");
102
- function SendForm(props) {
103
- var _this = this;
104
- var _a, _b, _c;
105
- var theme = (0, mui_1.useTheme)();
106
- var setRecipientAddress = props.setRecipientAddress, setRecipientAddressError = props.setRecipientAddressError;
107
- var inputAddressRef = (0, react_1.useRef)(null);
108
- var handlePaste = function () { return __awaiter(_this, void 0, void 0, function () {
109
- var text;
110
- return __generator(this, function (_a) {
111
- switch (_a.label) {
112
- case 0: return [4 /*yield*/, navigator.clipboard.readText()];
113
- case 1:
114
- text = _a.sent();
115
- setRecipientAddress === null || setRecipientAddress === void 0 ? void 0 : setRecipientAddress(text);
116
- setRecipientAddressError === null || setRecipientAddressError === void 0 ? void 0 : setRecipientAddressError(undefined);
117
- return [2 /*return*/];
118
- }
119
- });
120
- }); };
121
- var recipientAddress = props.recipientAddress, estimateFee = props.estimateFee, estimateReceive = props.estimateReceive, isLoadingEstimateFee = props.isLoadingEstimateFee, comment = props.comment, amountError = props.amountError, amountErrorMessage = props.amountErrorMessage, hiddenError = props.hiddenError, selectedMethod = props.selectedMethod, memo = props.memo, recipientAddressError = props.recipientAddressError, selectedToken = props.selectedToken, amount = props.amount, handleChangeRecipientAddress = props.handleChangeRecipientAddress, handleClearRecipientAddress = props.handleClearRecipientAddress, handleChangeAmount = props.handleChangeAmount, handleClickMaxAmount = props.handleClickMaxAmount, handleChangeMemo = props.handleChangeMemo, openScannerAddressQrCode = props.openScannerAddressQrCode, handleChangeComment = props.handleChangeComment;
122
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g16 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
123
- fontSize: theme.typography.fontSize14,
124
- color: theme.palette.text.primary,
125
- fontWeight: theme.typography.fontWeight700,
126
- }, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { ref: inputAddressRef, sx: {
127
- paddingRight: theme.styleMixins.customPadding.p12,
128
- borderRadius: theme.styleMixins.customRadius.r8,
129
- border: "1px solid",
130
- borderColor: theme.palette.divider,
131
- background: theme.palette.background.default,
132
- color: theme.palette.text.primary,
133
- }, inputRest: {
134
- placeholder: "Enter recipient address",
135
- value: recipientAddress,
136
- onChange: handleChangeRecipientAddress,
137
- hiddenLabel: true,
138
- }, rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8 }), children: !!recipientAddress ? ((0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClearRecipientAddress, sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8, cursor: "pointer" }), children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 12, height: 12 }, children: SvgPath_1.IC_CLOSE }) })) : ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { onClick: openScannerAddressQrCode, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 18, height: 18 }, children: SvgPath_1.IC_SCAN }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", variant: "fullWidth", flexItem: true }), (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handlePaste, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 18, height: 18 }, children: SvgPath_1.IC_DOCUMENTS }) })] })) }) }), !!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: {
139
- fontSize: theme.typography.fontSize14,
140
- color: theme.palette.text.primary,
141
- fontWeight: theme.typography.fontWeight700,
142
- }, children: "Withdrawal amount" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { fontSize: theme.typography.fontSize11, color: theme.palette.text.secondary }), children: "Your balance " }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { fontSize: theme.typography.fontSize12, color: theme.palette.text.primary }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.balance, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) }) })] })] }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
143
- paddingRight: theme.styleMixins.customPadding.p4,
144
- borderRadius: theme.styleMixins.customRadius.r8,
145
- border: "1px solid",
146
- borderColor: theme.palette.divider,
147
- background: theme.palette.background.default,
148
- color: theme.palette.text.primary,
149
- }, inputRest: {
150
- placeholder: "".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.min_value, " - ").concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.max_value),
151
- value: amount,
152
- onChange: handleChangeAmount,
153
- hiddenLabel: true,
154
- inputMode: "decimal",
155
- }, rightPart: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.value), children: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name }), (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClickMaxAmount, sx: {
156
- background: theme.palette.background.tertiary,
157
- color: theme.palette.text.primary,
158
- fontSize: theme.typography.fontSize11,
159
- fontWeight: theme.typography.fontWeight700,
160
- borderRadius: theme.styleMixins.customRadius.r4,
161
- paddingX: theme.styleMixins.customPadding.p16,
162
- paddingY: theme.styleMixins.customPadding.p8,
163
- border: "0px solid",
164
- cursor: "pointer",
165
- }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
166
- fontSize: theme.typography.fontSize12,
167
- color: theme.palette.text.primary,
168
- fontWeight: theme.typography.fontWeight500,
169
- }, children: "Max" }) })] }) }), !!amountError && !hiddenError && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.styleMixins.validationError), children: [amountErrorMessage, " ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amountError, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
170
- fontSize: theme.typography.fontSize14,
171
- color: theme.palette.text.primary,
172
- fontWeight: theme.typography.fontWeight700,
173
- }, children: "Comment" }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
174
- paddingRight: theme.styleMixins.customPadding.p12,
175
- borderRadius: theme.styleMixins.customRadius.r8,
176
- border: "1px solid",
177
- borderColor: theme.palette.divider,
178
- background: theme.palette.background.default,
179
- color: theme.palette.text.primary,
180
- }, inputRest: {
181
- placeholder: "Enter comment if needed",
182
- value: comment,
183
- onChange: handleChangeComment,
184
- hiddenLabel: true,
185
- } }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.validationDescription), children: "Enter comment if your receiving platform requires one to avoid losing your funds." })] }), selectedMethod === __1.SendMethods.TRANSFER_EXTERNAL && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.fieldTitle), children: "Memo" }), (0, jsx_runtime_1.jsx)(Input_1.default, { inputRest: {
186
- placeholder: "Enter memo",
187
- value: memo,
188
- onChange: handleChangeMemo,
189
- } })] })), !!((_a = estimateFee === null || estimateFee === void 0 ? void 0 : estimateFee.fee_detail) === null || _a === void 0 ? void 0 : _a.length) && !!amount && ((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, estimateReceive: estimateReceive })), selectedMethod === __1.SendMethods.TRANSFER_INTERNAL && ((0, jsx_runtime_1.jsx)(TransferInternal_1.default, { titleHeader: "Transfer Internal", transferData: {
190
- amount: Number(amount),
191
- currency_slug: (_b = selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) !== null && _b !== void 0 ? _b : "",
192
- to_address: recipientAddress || "",
193
- metadata: JSON.stringify({
194
- amount: Number(amount),
195
- currency_slug: (_c = selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) !== null && _c !== void 0 ? _c : "",
196
- message: comment !== null && comment !== void 0 ? comment : "",
197
- to_address: recipientAddress || "",
198
- action: type_1.TransactionSlug.TRANSFER_INTERNAL,
199
- }),
200
- }, transferContent: (0, jsx_runtime_1.jsx)(Column_1.default, { children: (0, jsx_runtime_1.jsx)(infoSummary_1.default, { type: type_1.TransactionSlug.TRANSFER_INTERNAL, message: comment, datetime: new Date().toISOString(), recipientAddress: recipientAddress, amount: amount, estimateFee: estimateFee, estimateReceive: estimateReceive, selectedToken: selectedToken }) }), children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { width: "100%" }, status: !!amountError ||
201
- !!recipientAddressError ||
202
- !recipientAddress ||
203
- !amount ||
204
- !selectedToken ||
205
- isLoadingEstimateFee
206
- ? // isValidatingAddress
207
- Button_1.BUTTON_STATUS.DISABLED
208
- : Button_1.BUTTON_STATUS.ENABLED, children: "Continue" }) })
209
- // initFeeData={estimateFee}
210
- // sendInternalData={{
211
- // amount: +(amount || 0),
212
- // currency_slug: selectedToken?.slug || "",
213
- // to_address: recipientAddress || "",
214
- // }}
215
- // onSuccess={close}
216
- // >
217
- // <Button.Primary
218
- // sx={{ width: "100%" }}
219
- // status={
220
- // !!amountError ||
221
- // !!recipientAddressError ||
222
- // !recipientAddress ||
223
- // !amount ||
224
- // !selectedToken ||
225
- // isLoadingEstimateFee
226
- // ? // isValidatingAddress
227
- // BUTTON_STATUS.DISABLED
228
- // : BUTTON_STATUS.ENABLED
229
- // }
230
- // >
231
- // Continue
232
- // </Button.Primary>
233
- // </TransferInternal>
234
- )] }));
235
- }
@@ -1,7 +0,0 @@
1
- import { SortBalance } from "..";
2
- interface SortByBalanceProps {
3
- sortBalance: SortBalance;
4
- setSortBalance: (sortBalance: SortBalance) => void;
5
- }
6
- export default function SortByBalance(props: SortByBalanceProps): import("react/jsx-runtime").JSX.Element;
7
- export type { SortByBalanceProps };
@@ -1,45 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.default = SortByBalance;
18
- var jsx_runtime_1 = require("react/jsx-runtime");
19
- var material_1 = require("@mui/material");
20
- var Text_1 = __importDefault(require("../../Text"));
21
- var SvgPath_1 = require("../../SvgPath");
22
- var mui_1 = require("../../../../theme/mui");
23
- var __1 = require("..");
24
- function SortByBalance(props) {
25
- var sortBalance = props.sortBalance, setSortBalance = props.setSortBalance;
26
- var theme = (0, mui_1.useTheme)();
27
- return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", gap: 0.5, onClick: function () {
28
- if (sortBalance === __1.SortBalance.ASC) {
29
- setSortBalance(__1.SortBalance.DESC);
30
- }
31
- else {
32
- setSortBalance(__1.SortBalance.ASC);
33
- }
34
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.valueDescription), { color: theme.palette.text.secondary, fontWeight: theme.typography.fontWeight600 }), children: "Balance" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex flex-col gap-[0.8px]", children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { inheritViewBox: true, sx: {
35
- width: 8,
36
- height: 5,
37
- transition: "opacity 0.2s ease-in-out",
38
- opacity: sortBalance === __1.SortBalance.ASC ? 0.8 : 0.5,
39
- }, children: SvgPath_1.ARROW_DROP_UP }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { inheritViewBox: true, sx: {
40
- width: 8,
41
- height: 5,
42
- transition: "opacity 0.2s ease-in-out",
43
- opacity: sortBalance === __1.SortBalance.DESC ? 0.8 : 0.5,
44
- }, children: SvgPath_1.ARROW_DROP_DOWN })] })] }));
45
- }
@@ -1,7 +0,0 @@
1
- import { SortToken } from "..";
2
- interface SortByTokenProps {
3
- sortToken: SortToken;
4
- setSortToken: (sortToken: SortToken) => void;
5
- }
6
- export default function SortByToken(props: SortByTokenProps): import("react/jsx-runtime").JSX.Element;
7
- export type { SortByTokenProps };
@@ -1,45 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.default = SortByToken;
18
- var jsx_runtime_1 = require("react/jsx-runtime");
19
- var material_1 = require("@mui/material");
20
- var Text_1 = __importDefault(require("../../Text"));
21
- var SvgPath_1 = require("../../SvgPath");
22
- var mui_1 = require("../../../../theme/mui");
23
- var __1 = require("..");
24
- function SortByToken(props) {
25
- var sortToken = props.sortToken, setSortToken = props.setSortToken;
26
- var theme = (0, mui_1.useTheme)();
27
- return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", gap: 0.5, onClick: function () {
28
- if (sortToken === __1.SortToken.ASC) {
29
- setSortToken(__1.SortToken.DESC);
30
- }
31
- else {
32
- setSortToken(__1.SortToken.ASC);
33
- }
34
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.valueDescription), { color: theme.palette.text.secondary, fontWeight: theme.typography.fontWeight600 }), children: "Token" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex flex-col gap-[0.8px]", children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { inheritViewBox: true, sx: {
35
- width: 8,
36
- height: 5,
37
- transition: "opacity 0.2s ease-in-out",
38
- opacity: sortToken === __1.SortToken.ASC ? 0.8 : 0.5,
39
- }, children: SvgPath_1.ARROW_DROP_UP }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { inheritViewBox: true, sx: {
40
- width: 8,
41
- height: 5,
42
- transition: "opacity 0.2s ease-in-out",
43
- opacity: sortToken === __1.SortToken.DESC ? 0.8 : 0.5,
44
- }, children: SvgPath_1.ARROW_DROP_DOWN })] })] }));
45
- }
@@ -1,14 +0,0 @@
1
- import { FeesDataType } from "../../../../../services/axios/get-est-fee-service/type";
2
- import { WithdrawCurrency } from "../../../../../services/axios/get-withdraw-tokens-list-service/type";
3
- interface TransferInfoProps {
4
- type?: string;
5
- message?: string;
6
- datetime?: string;
7
- recipientAddress?: string;
8
- amount?: string | number;
9
- estimateFee?: FeesDataType;
10
- estimateReceive?: string | number;
11
- selectedToken?: WithdrawCurrency;
12
- }
13
- export default function TransferInfo(props: TransferInfoProps): import("react/jsx-runtime").JSX.Element;
14
- export type { TransferInfoProps };
@@ -1,111 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || (function () {
30
- var ownKeys = function(o) {
31
- ownKeys = Object.getOwnPropertyNames || function (o) {
32
- var ar = [];
33
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
- return ar;
35
- };
36
- return ownKeys(o);
37
- };
38
- return function (mod) {
39
- if (mod && mod.__esModule) return mod;
40
- var result = {};
41
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
- __setModuleDefault(result, mod);
43
- return result;
44
- };
45
- })();
46
- var __importDefault = (this && this.__importDefault) || function (mod) {
47
- return (mod && mod.__esModule) ? mod : { "default": mod };
48
- };
49
- Object.defineProperty(exports, "__esModule", { value: true });
50
- exports.default = TransferInfo;
51
- var jsx_runtime_1 = require("react/jsx-runtime");
52
- var material_1 = require("@mui/material");
53
- var Text_1 = __importDefault(require("../../../Text"));
54
- var InlineTitleValue_1 = __importDefault(require("../../../InlineTitleValue"));
55
- var CopyTextComponent_1 = __importDefault(require("../../../CopyTextComponent"));
56
- var SvgPath_1 = require("../../../SvgPath");
57
- var Fees_1 = __importStar(require("../../../Fees"));
58
- var safeText_1 = require("../../../../../utils/safeText");
59
- var formatDate_1 = require("../../../../../utils/formatDate");
60
- var mui_1 = require("../../../../../theme/mui");
61
- function TransferInfo(props) {
62
- var type = props.type, message = props.message, datetime = props.datetime, recipientAddress = props.recipientAddress, amount = props.amount, estimateFee = props.estimateFee, estimateReceive = props.estimateReceive, selectedToken = props.selectedToken;
63
- var theme = (0, mui_1.useTheme)();
64
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
65
- display: "flex",
66
- flexDirection: "column",
67
- gap: 3,
68
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.headerTitle), { textAlign: "start", mr: "auto" }), children: "Transaction summary" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
69
- display: "flex",
70
- flexDirection: "column",
71
- gap: 3,
72
- }, children: [(0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Amount", titleStyle: {
73
- fontSize: "0.875rem",
74
- fontWeight: 500,
75
- color: "text.secondary",
76
- }, value: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
77
- fontSize: "0.875rem",
78
- fontWeight: 500,
79
- }, children: [amount, " ", selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug.toUpperCase()] }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Address", titleStyle: {
80
- fontSize: "0.875rem",
81
- fontWeight: 500,
82
- color: "text.secondary",
83
- }, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex flex-row gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
84
- fontSize: "0.875rem",
85
- fontWeight: 500,
86
- }, children: (0, safeText_1.safeText)(recipientAddress || "", { isShort: true }) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
87
- width: 16,
88
- height: 16,
89
- }, children: SvgPath_1.IC_COPY })] }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Type", titleStyle: {
90
- fontSize: "0.875rem",
91
- fontWeight: 500,
92
- color: "text.secondary",
93
- }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
94
- fontSize: "0.875rem",
95
- fontWeight: 500,
96
- }, children: type }), isAligned: true }), message && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Message", titleStyle: {
97
- fontSize: "0.875rem",
98
- fontWeight: 500,
99
- color: "text.secondary",
100
- }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
101
- fontSize: "0.875rem",
102
- fontWeight: 500,
103
- }, children: message }), isAligned: true })), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Datetime", titleStyle: {
104
- fontSize: "0.875rem",
105
- fontWeight: 500,
106
- color: "text.secondary",
107
- }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
108
- fontSize: "0.875rem",
109
- fontWeight: 500,
110
- }, children: (0, formatDate_1.customFormatDate)(datetime || "", { format: formatDate_1.DateFormat.MMM_DD_YYYY_HH_MM_SS }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: estimateFee, amount: +(amount || 0), tokenSlug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "", feesStyle: Fees_1.FeesStyle.DEFAULT, estimateReceive: estimateReceive })] })] }));
111
- }
@@ -1,5 +0,0 @@
1
- import { GeneralProps } from "../../../../types/ui";
2
- interface TransferHistoryProps extends GeneralProps {
3
- }
4
- declare const TransferHistory: (props: TransferHistoryProps) => import("react/jsx-runtime").JSX.Element;
5
- export default TransferHistory;
@@ -1,5 +0,0 @@
1
- import { GeneralProps } from "../../../../types/ui";
2
- interface TutorialProps extends GeneralProps {
3
- }
4
- declare const Tutorial: (props: TutorialProps) => import("react/jsx-runtime").JSX.Element;
5
- export default Tutorial;
@@ -1,38 +0,0 @@
1
- import { ReactEventHandler } from "react";
2
- import { GeneralProps } from "../../../types/ui";
3
- interface WithdrawFunctionProps extends GeneralProps {
4
- onClose?: ReactEventHandler;
5
- onOpen?: ReactEventHandler;
6
- onSendSuccess?: (response: any) => void;
7
- }
8
- type WithdrawFunctionRef = {
9
- open: () => void;
10
- close: () => void;
11
- };
12
- export declare enum SendMethods {
13
- SCAN_QR_CODE = "scan qr code",
14
- TRANSFER_INTERNAL = "send internal",
15
- TRANSFER_EXTERNAL = "send external"
16
- }
17
- export declare enum WithdrawStep {
18
- SELECT_METHOD = 0,
19
- SELECT_TOKEN = 1,
20
- SELECT_NETWORK = 2,
21
- FORM = 3,
22
- CONFIRM = 4
23
- }
24
- export declare enum SortBalance {
25
- ASC = "asc",
26
- DESC = "desc"
27
- }
28
- export declare enum SortToken {
29
- ASC = "asc",
30
- DESC = "desc"
31
- }
32
- export declare enum WAmountError {
33
- INSUFFICIENT_BALANCE = "\u24D8 Insufficient transaction fee!",
34
- MAX_LIMIT = "\u24D8 Enter a maximum amount of",
35
- MIN_LIMIT = "\u24D8 Enter a minimum amount of"
36
- }
37
- declare const WithdrawFunction: import("react").ForwardRefExoticComponent<WithdrawFunctionProps & import("react").RefAttributes<WithdrawFunctionRef>>;
38
- export default WithdrawFunction;