tek-wallet 0.0.762 → 0.0.764
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/index.d.ts +2 -0
- package/dist/components/TekWallet/components/index.js +2 -0
- package/dist/components/TekWallet/components/layouts/ChildPageLayout/index.d.ts +6 -0
- package/dist/components/TekWallet/components/layouts/ChildPageLayout/index.js +2 -2
- package/dist/components/TekWallet/components/layouts/ChildPageLayout/style.d.ts +2 -0
- package/dist/components/TekWallet/components/layouts/ChildPageLayout/style.js +9 -0
- package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.d.ts +2 -0
- package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.js +6 -6
- package/dist/components/TekWallet/components/ui/ActivityDetail/index.js +5 -4
- package/dist/components/TekWallet/components/ui/ActivityItem/index.js +2 -2
- package/dist/components/TekWallet/components/ui/AnalyticGroupCenter/index.js +1 -1
- package/dist/components/TekWallet/components/ui/Button/index.js +2 -2
- package/dist/components/TekWallet/components/ui/DelayMounted/index.js +1 -1
- package/dist/components/TekWallet/components/ui/ListItemCustom/index.js +1 -1
- package/dist/components/TekWallet/components/ui/NetworkSelection/index.js +3 -1
- package/dist/components/TekWallet/components/ui/ReceiveFunction/index.js +126 -107
- package/dist/components/TekWallet/components/ui/SmartList/index.d.ts +2 -1
- package/dist/components/TekWallet/components/ui/SmartList/index.js +2 -2
- package/dist/components/TekWallet/components/ui/SwapFunction/index.js +36 -37
- package/dist/components/TekWallet/components/ui/TokenSelection/index.js +1 -1
- package/dist/components/TekWallet/components/ui/WaitingData/index.js +7 -6
- package/dist/components/TekWallet/components/views/ActivityView/index.js +5 -2
- package/dist/components/TekWallet/components/views/AssetView/index.js +15 -6
- package/dist/components/TekWallet/components/views/DetailActivityView/index.js +1 -1
- package/dist/components/TekWallet/components/views/NotFoundView/index.js +31 -1
- package/dist/components/TekWallet/components/views/SendExternalView/components/Form.js +73 -69
- package/dist/components/TekWallet/components/views/SendExternalView/index.js +1 -7
- package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +60 -59
- package/dist/components/TekWallet/components/views/SendInternalView/index.js +1 -1
- package/dist/components/TekWallet/components/views/SettingView/index.js +47 -5
- package/dist/components/TekWallet/components/views/SwapView/components/FromCard/index.js +7 -6
- package/dist/components/TekWallet/components/views/SwapView/index.d.ts +1 -10
- package/dist/components/TekWallet/components/views/SwapView/index.js +3 -27
- package/dist/components/TekWallet/components/views/TekWalletView/index.js +0 -1
- package/dist/components/TekWallet/providers/ActivitiesProvider/const.d.ts +1 -1
- package/dist/components/TekWallet/providers/ActivitiesProvider/const.js +1 -1
- package/dist/components/TekWallet/providers/TekWalletProvider/index.d.ts +6 -0
- package/dist/components/TekWallet/providers/TekWalletProvider/index.js +7 -1
- package/dist/components/TekWallet/theme/mui/theme.js +2 -2
- package/package.json +1 -1
|
@@ -104,6 +104,7 @@ var type_1 = require("../../../../services/axios/get-activities-service/type");
|
|
|
104
104
|
var Fees_1 = __importStar(require("../../../ui/Fees"));
|
|
105
105
|
var xhub_keyboard_1 = require("xhub-keyboard");
|
|
106
106
|
var useUniqueId_1 = require("../../../../hooks/useUniqueId");
|
|
107
|
+
var ChildPageLayout_1 = __importDefault(require("../../../layouts/ChildPageLayout"));
|
|
107
108
|
var validateAddressDebounce = (0, lodash_1.debounce)(function (callback) {
|
|
108
109
|
callback();
|
|
109
110
|
}, 500, { leading: true, trailing: true });
|
|
@@ -317,65 +318,65 @@ function Form(props) {
|
|
|
317
318
|
container: {
|
|
318
319
|
height: "100%",
|
|
319
320
|
},
|
|
320
|
-
}, id: keyboardId, onChange: handleKeyboardChangeAmount, keyboardType: xhub_keyboard_1.KeyboardType.Double, value: amount === null || amount === void 0 ? void 0 : amount.toString(), keyboardId: "form-amount-keyboard-id", onOpen: handleKeyboardOpen, onClose: handleKeyboardClose, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, minHeight: "100%", transition: "padding-bottom 0.3s ease-in-out" }), sx), (isKeyboardOpen
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
color: theme.palette.text.black,
|
|
337
|
-
fontWeight: theme.typography.fontWeight700,
|
|
338
|
-
}, children: "Withdrawal amount" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontSize: theme.typography.fontSize11, color: theme.palette.text.accent }), children: "Your balance " }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontSize: theme.typography.fontSize12, color: theme.palette.text.black, fontWeight: theme.typography.fontWeight700 }), 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)(xhub_keyboard_1.Label, { htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Input, { elementsAcceptIds: ["form-amount-keyboard-id"], value: amount === null || amount === void 0 ? void 0 : amount.toString(), displayType: xhub_keyboard_1.DisplayType.Double, placeholder: ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
339
|
-
display: "inline-flex",
|
|
340
|
-
alignItems: "center",
|
|
341
|
-
gap: theme.mixins.gaps.g4,
|
|
342
|
-
pointerEvents: "none",
|
|
343
|
-
}, children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.min_value }), " -", " ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.max_value, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) })] })), styles: {
|
|
344
|
-
container: {
|
|
345
|
-
paddingRight: theme.mixins.customPadding.p4,
|
|
346
|
-
paddingLeft: theme.mixins.customPadding.p16,
|
|
347
|
-
paddingTop: theme.mixins.customPadding.p4,
|
|
348
|
-
paddingBottom: theme.mixins.customPadding.p4,
|
|
349
|
-
border: "1px ".concat(theme.palette.border.primary, " solid"),
|
|
350
|
-
borderRadius: theme.mixins.customRadius.r8,
|
|
351
|
-
},
|
|
352
|
-
}, rightElement: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClickMaxAmount, sx: {
|
|
353
|
-
background: theme.palette.background.tertiary,
|
|
321
|
+
}, id: keyboardId, onChange: handleKeyboardChangeAmount, keyboardType: xhub_keyboard_1.KeyboardType.Double, value: amount === null || amount === void 0 ? void 0 : amount.toString(), keyboardId: "form-amount-keyboard-id", onOpen: handleKeyboardOpen, onClose: handleKeyboardClose, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, minHeight: "100%", transition: "padding-bottom 0.3s ease-in-out" }), sx), (isKeyboardOpen
|
|
322
|
+
? {
|
|
323
|
+
paddingBottom: theme.mixins.customPadding.p8,
|
|
324
|
+
}
|
|
325
|
+
: {})), children: [(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: {
|
|
326
|
+
fontSize: theme.typography.fontSize14,
|
|
327
|
+
color: theme.palette.text.black,
|
|
328
|
+
fontWeight: theme.typography.fontWeight700,
|
|
329
|
+
}, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
|
|
330
|
+
paddingX: theme.mixins.customPadding.p16,
|
|
331
|
+
}, inputRest: {
|
|
332
|
+
placeholder: "Enter recipient address",
|
|
333
|
+
value: recipientAddress,
|
|
334
|
+
onChange: handleChangeRecipientAddress,
|
|
335
|
+
}, rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: !!recipientAddress ? ((0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClearRecipientAddress, sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.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.mixins.row), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { onClick: openScannerAddressQrCode, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_SCAN", sx: { width: 18, height: 18 } }) }), (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.mixins.validationError), children: recipientAddressError }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, alignItems: "center", justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
336
|
+
fontSize: theme.typography.fontSize14,
|
|
354
337
|
color: theme.palette.text.black,
|
|
355
|
-
fontSize: theme.typography.fontSize11,
|
|
356
338
|
fontWeight: theme.typography.fontWeight700,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}, children: (0, jsx_runtime_1.jsx)(
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
339
|
+
}, children: "Withdrawal amount" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontSize: theme.typography.fontSize11, color: theme.palette.text.accent }), children: "Your balance " }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontSize: theme.typography.fontSize12, color: theme.palette.text.black, fontWeight: theme.typography.fontWeight700 }), 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)(xhub_keyboard_1.Label, { htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Input, { elementsAcceptIds: ["form-amount-keyboard-id"], value: amount === null || amount === void 0 ? void 0 : amount.toString(), displayType: xhub_keyboard_1.DisplayType.Double, placeholder: ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
340
|
+
display: "inline-flex",
|
|
341
|
+
alignItems: "center",
|
|
342
|
+
gap: theme.mixins.gaps.g4,
|
|
343
|
+
pointerEvents: "none",
|
|
344
|
+
}, children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.min_value }), " -", " ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.max_value, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) })] })), styles: {
|
|
345
|
+
container: {
|
|
346
|
+
paddingRight: theme.mixins.customPadding.p4,
|
|
347
|
+
paddingLeft: theme.mixins.customPadding.p16,
|
|
348
|
+
paddingTop: theme.mixins.customPadding.p4,
|
|
349
|
+
paddingBottom: theme.mixins.customPadding.p4,
|
|
350
|
+
border: "1px ".concat(theme.palette.border.primary, " solid"),
|
|
351
|
+
borderRadius: theme.mixins.customRadius.r8,
|
|
352
|
+
},
|
|
353
|
+
}, rightElement: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClickMaxAmount, sx: {
|
|
354
|
+
background: theme.palette.background.tertiary,
|
|
355
|
+
color: theme.palette.text.black,
|
|
356
|
+
fontSize: theme.typography.fontSize11,
|
|
357
|
+
fontWeight: theme.typography.fontWeight700,
|
|
358
|
+
borderRadius: theme.mixins.customRadius.r4,
|
|
359
|
+
paddingX: theme.mixins.customPadding.p16,
|
|
360
|
+
paddingY: theme.mixins.customPadding.p8,
|
|
361
|
+
border: "0px solid",
|
|
362
|
+
cursor: "pointer",
|
|
363
|
+
}, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
364
|
+
fontSize: theme.typography.fontSize12,
|
|
365
|
+
color: theme.palette.text.primary,
|
|
366
|
+
fontWeight: theme.typography.fontWeight500,
|
|
367
|
+
}, children: "Max" }) }) }) }) }), !!amountErrorMessage && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: [amountErrorMessage, " ", !!amountError && ((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.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
368
|
+
fontSize: theme.typography.fontSize14,
|
|
369
|
+
color: theme.palette.text.black,
|
|
370
|
+
fontWeight: theme.typography.fontWeight700,
|
|
371
|
+
}, children: "Message" }), (0, jsx_runtime_1.jsx)(Input_1.default, { inputRest: {
|
|
372
|
+
placeholder: "Enter comment if needed",
|
|
373
|
+
value: comment,
|
|
374
|
+
onChange: handleChangeComment,
|
|
375
|
+
} })] }), (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)(QrCodeReader_1.default, { ref: scannerAddressQrCodeRef, onResult: handleScanAddressQrCode }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { loading: isValidatingAddress || isEstimatingFee, onClick: handleContinue, status: !recipientAddress ||
|
|
376
|
+
!amount ||
|
|
377
|
+
!!recipientAddressError ||
|
|
378
|
+
!!amountError ||
|
|
379
|
+
!isEnoughBalanceToPayFee
|
|
380
|
+
? Button_1.BUTTON_STATUS.DISABLED
|
|
381
|
+
: Button_1.BUTTON_STATUS.ENABLED, sx: { width: "100%", marginTop: "auto" }, children: "Continue" })] }) }) }));
|
|
381
382
|
}
|
|
@@ -137,7 +137,7 @@ exports.SendInternalView = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
137
137
|
height: "100%",
|
|
138
138
|
}, swiperStyle: {
|
|
139
139
|
height: "100%",
|
|
140
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: {
|
|
140
|
+
}, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { height: "100%", overflow: "hidden" }, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { children: (0, jsx_runtime_1.jsx)(SelectToken_1.default, { tokens: withdrawTokens, selectedToken: selectedToken, onChangeToken: handleSelectToken }) }) }) }, TransferStep.SELECT_TOKEN), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { minHeight: "100%" }, children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
|
|
141
141
|
height: "100%",
|
|
142
142
|
paddingLeft: "0px",
|
|
143
143
|
paddingRight: "0px",
|
|
@@ -11,6 +11,39 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
return __assign.apply(this, arguments);
|
|
13
13
|
};
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
+
}
|
|
20
|
+
Object.defineProperty(o, k2, desc);
|
|
21
|
+
}) : (function(o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
}));
|
|
25
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
+
}) : function(o, v) {
|
|
28
|
+
o["default"] = v;
|
|
29
|
+
});
|
|
30
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
+
var ownKeys = function(o) {
|
|
32
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
+
var ar = [];
|
|
34
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
+
return ar;
|
|
36
|
+
};
|
|
37
|
+
return ownKeys(o);
|
|
38
|
+
};
|
|
39
|
+
return function (mod) {
|
|
40
|
+
if (mod && mod.__esModule) return mod;
|
|
41
|
+
var result = {};
|
|
42
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
+
__setModuleDefault(result, mod);
|
|
44
|
+
return result;
|
|
45
|
+
};
|
|
46
|
+
})();
|
|
14
47
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
48
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
49
|
};
|
|
@@ -23,25 +56,34 @@ var material_1 = require("@mui/material");
|
|
|
23
56
|
var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
|
|
24
57
|
var ListItemCustom_1 = __importDefault(require("../../ui/ListItemCustom"));
|
|
25
58
|
var ChangePasscode_1 = __importDefault(require("../../ui/ChangePasscode"));
|
|
26
|
-
var Button_1 = __importDefault(require("../../ui/Button"));
|
|
27
59
|
var providers_1 = require("../../../providers");
|
|
28
60
|
var TekWalletProvider_1 = require("../../../providers/TekWalletProvider");
|
|
29
61
|
var SvgPath_1 = require("../../ui/SvgPath");
|
|
62
|
+
var Button_1 = __importStar(require("../../ui/Button"));
|
|
63
|
+
var react_1 = require("react");
|
|
30
64
|
var SettingView = function (props) {
|
|
31
65
|
var _a = props;
|
|
66
|
+
var _b = (0, react_1.useState)(Button_1.BUTTON_STATUS.ENABLED), buttonStatus = _b[0], setButtonStatus = _b[1];
|
|
32
67
|
var theme = (0, providers_1.useTheme)();
|
|
33
68
|
var onLogout = (0, TekWalletProvider_1.useWalletConfig)().onLogout;
|
|
34
|
-
|
|
69
|
+
var handleLogout = function () {
|
|
70
|
+
if (!onLogout)
|
|
71
|
+
return;
|
|
72
|
+
onLogout === null || onLogout === void 0 ? void 0 : onLogout();
|
|
73
|
+
setButtonStatus(Button_1.BUTTON_STATUS.LOADING);
|
|
74
|
+
};
|
|
75
|
+
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Setting" }), children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16 }), children: [(0, jsx_runtime_1.jsx)(ChangePasscode_1.default, { children: (0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { hideTag: true, title: "Change Passcode", description: "Change your passcode", icon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "2rem", height: "2rem" }, children: SvgPath_1.IC_CHANGE_PASSCODE }) }) }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: {
|
|
35
76
|
marginTop: "auto",
|
|
36
77
|
borderRadius: theme.mixins.customRadius.r12,
|
|
37
78
|
textTransform: "capitalize",
|
|
38
79
|
position: "relative",
|
|
39
|
-
|
|
40
|
-
py: theme.mixins.customPadding.p12,
|
|
80
|
+
padding: "".concat(theme.mixins.customPadding.p12, " ").concat(theme.mixins.customPadding.p16),
|
|
41
81
|
fontWeight: theme.typography.fontWeight500,
|
|
42
82
|
fontSize: theme.typography.fontSize14,
|
|
43
83
|
lineHeight: theme.typography.leading100,
|
|
44
|
-
|
|
84
|
+
backgroundColor: theme.palette.background.error,
|
|
85
|
+
color: theme.palette.text.white,
|
|
86
|
+
}, onClick: handleLogout, status: buttonStatus, children: "Logout" })] }) }));
|
|
45
87
|
};
|
|
46
88
|
exports.SettingView = SettingView;
|
|
47
89
|
exports.default = exports.SettingView;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
"use client";
|
|
2
3
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
4
|
if (k2 === undefined) k2 = k;
|
|
4
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -130,16 +131,16 @@ var CardForm = function (_a) {
|
|
|
130
131
|
justifyContent: "space-between",
|
|
131
132
|
mt: theme.mixins.customMargin.m20,
|
|
132
133
|
mb: theme.mixins.customMargin.m16,
|
|
133
|
-
}, children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: selectTokenRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, trigger: (0, jsx_runtime_1.
|
|
134
|
+
}, children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: selectTokenRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, trigger: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
134
135
|
display: "flex",
|
|
135
136
|
alignItems: "center",
|
|
136
137
|
gap: theme.mixins.gaps.g4,
|
|
137
138
|
cursor: "pointer",
|
|
138
139
|
width: "fit-content",
|
|
139
|
-
}, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.link, width: 20, height: 20, sx: { borderRadius: "9999px" } }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
}, children: !!selectedToken && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.link, width: 20, height: 20, sx: { borderRadius: "9999px" } }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
141
|
+
color: theme.palette.text.blackContrast,
|
|
142
|
+
fontWeight: theme.typography.fontWeight600,
|
|
143
|
+
}, children: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) || (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.full_name) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 10, height: 10 }, children: SvgPath_1.IC_ARROW_BLACK_DROP })] })) }), children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Select Token", overrideBack: closeSelectToken }), children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
|
|
143
144
|
width: "100dvw",
|
|
144
145
|
height: "100dvh",
|
|
145
146
|
}, children: (0, jsx_runtime_1.jsx)(SelectToken_1.default, { tokens: fromTokens, selectedToken: selectedToken, onChangeToken: handleSelectToken }) }) }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
@@ -168,7 +169,7 @@ var CardForm = function (_a) {
|
|
|
168
169
|
borderRadius: theme.mixins.customRadius.r8,
|
|
169
170
|
color: theme.palette.text.primary,
|
|
170
171
|
px: theme.mixins.customPadding.p16,
|
|
171
|
-
py: theme.mixins.customPadding.
|
|
172
|
+
py: theme.mixins.customPadding.p8,
|
|
172
173
|
marginLeft: "auto",
|
|
173
174
|
}, onClick: handleClickGetMaxValue, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
174
175
|
color: theme.palette.primary.main,
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
interface SwapViewProps extends GeneralProps {
|
|
3
|
-
onClose?: UnknownFunction;
|
|
4
|
-
onOpen?: UnknownFunction;
|
|
5
|
-
}
|
|
6
|
-
export type SwapViewRef = {
|
|
7
|
-
open: () => void;
|
|
8
|
-
close: () => void;
|
|
9
|
-
};
|
|
10
|
-
export declare const SwapView: import("react").ForwardRefExoticComponent<SwapViewProps & import("react").RefAttributes<SwapViewRef>>;
|
|
1
|
+
export declare const SwapView: () => import("react/jsx-runtime").JSX.Element;
|
|
11
2
|
export default SwapView;
|
|
@@ -77,8 +77,7 @@ var SWAP_STEP_NAME = (_a = {},
|
|
|
77
77
|
_a[SwapStep.FORM] = "Swap",
|
|
78
78
|
_a[SwapStep.CONFIRM] = "Confirm",
|
|
79
79
|
_a);
|
|
80
|
-
|
|
81
|
-
var drawerRef = (0, react_1.useRef)(null);
|
|
80
|
+
var SwapView = function () {
|
|
82
81
|
var swiperRef = (0, react_1.useRef)(null);
|
|
83
82
|
var theme = (0, ThemeProvider_1.useTheme)();
|
|
84
83
|
var _a = (0, react_1.useState)(SwapStep.FORM), currentStep = _a[0], setCurrentStep = _a[1];
|
|
@@ -136,29 +135,6 @@ exports.SwapView = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
136
135
|
var handleSelectOutputToken = function (output) {
|
|
137
136
|
setToTokenSelected(output);
|
|
138
137
|
};
|
|
139
|
-
var handleOnCloseSwap = (0, react_1.useCallback)(function () {
|
|
140
|
-
var _a;
|
|
141
|
-
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
142
|
-
gotoStep(SwapStep.FORM);
|
|
143
|
-
}, [props]);
|
|
144
|
-
var handleOnOpenSwap = (0, react_1.useCallback)(function () {
|
|
145
|
-
var _a;
|
|
146
|
-
(_a = props.onOpen) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
147
|
-
}, [props]);
|
|
148
|
-
var openSwapPage = (0, react_1.useCallback)(function () {
|
|
149
|
-
var _a;
|
|
150
|
-
(_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.open();
|
|
151
|
-
handleOnOpenSwap();
|
|
152
|
-
}, [handleOnOpenSwap]);
|
|
153
|
-
var closeSwapPage = (0, react_1.useCallback)(function () {
|
|
154
|
-
var _a;
|
|
155
|
-
(_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
156
|
-
handleOnCloseSwap();
|
|
157
|
-
}, [handleOnCloseSwap]);
|
|
158
|
-
(0, react_1.useImperativeHandle)(ref, function () { return ({
|
|
159
|
-
open: openSwapPage,
|
|
160
|
-
close: closeSwapPage,
|
|
161
|
-
}); });
|
|
162
138
|
var handlePreviewSwap = (0, react_1.useCallback)(function () {
|
|
163
139
|
gotoStep(SwapStep.CONFIRM);
|
|
164
140
|
}, []);
|
|
@@ -213,6 +189,6 @@ exports.SwapView = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
213
189
|
onDone: handleNewTransaction,
|
|
214
190
|
onSuccess: handleOnSuccessSwap,
|
|
215
191
|
} }) }, SwapStep.CONFIRM)] }) }) }));
|
|
216
|
-
}
|
|
217
|
-
exports.SwapView
|
|
192
|
+
};
|
|
193
|
+
exports.SwapView = SwapView;
|
|
218
194
|
exports.default = exports.SwapView;
|
|
@@ -32,7 +32,6 @@ function TekWalletView() {
|
|
|
32
32
|
var pathname = (0, navigation_1.useParams)().pathname;
|
|
33
33
|
var pathnameArray = (0, react_1.useMemo)(function () { return (typeof pathname === "string" ? [pathname] : pathname); }, [pathname]);
|
|
34
34
|
var pathnameFull = (0, react_1.useMemo)(function () { return pathnameArray === null || pathnameArray === void 0 ? void 0 : pathnameArray.join("/"); }, [pathnameArray]);
|
|
35
|
-
console.warn("🚀 ~ TekWalletView ~ pathnameFull:", pathname, pathnameFull);
|
|
36
35
|
var path = (0, react_1.useMemo)(function () { return (pathname === undefined ? "/" : "/".concat(pathnameFull)); }, [pathnameFull, pathname]);
|
|
37
36
|
if (path.startsWith(TekWalletViewRoutes.SEND_INTERNAL)) {
|
|
38
37
|
return (0, jsx_runtime_1.jsx)(SendInternalView_1.default, {});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ACTIVITIES_TYPE_ALL = exports.ACTIVITIES_PAGE_SIZE = void 0;
|
|
4
4
|
var type_1 = require("../../services/axios/get-activities-service/type");
|
|
5
|
-
exports.ACTIVITIES_PAGE_SIZE =
|
|
5
|
+
exports.ACTIVITIES_PAGE_SIZE = 12;
|
|
6
6
|
exports.ACTIVITIES_TYPE_ALL = {
|
|
7
7
|
id: -1,
|
|
8
8
|
status: "all",
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
+
export declare enum Views {
|
|
3
|
+
ACTIVITY = "activity",
|
|
4
|
+
SETTING = "setting",
|
|
5
|
+
ASSET = "asset"
|
|
6
|
+
}
|
|
2
7
|
export interface Options {
|
|
3
8
|
basePath?: string;
|
|
4
9
|
hideDefaultActivities?: boolean;
|
|
5
10
|
useDefaultToastMessage?: boolean;
|
|
6
11
|
hideActivitySectionInAssetView?: boolean;
|
|
7
12
|
useBasicAmountGroupInAssetView?: boolean;
|
|
13
|
+
hideBackButtons: Partial<Record<Views, boolean>>;
|
|
8
14
|
}
|
|
9
15
|
export interface TekWalletProviderProps {
|
|
10
16
|
children: ReactNode;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.useWalletConfig = exports.TekWalletContext = void 0;
|
|
7
|
+
exports.useWalletConfig = exports.TekWalletContext = exports.Views = void 0;
|
|
8
8
|
exports.TekWalletProvider = TekWalletProvider;
|
|
9
9
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
10
10
|
var react_1 = require("react");
|
|
@@ -18,6 +18,12 @@ var SwapProvider_1 = __importDefault(require("../SwapProvider"));
|
|
|
18
18
|
var WalletDataProviderNoImport_1 = __importDefault(require("../WalletDataProviderNoImport"));
|
|
19
19
|
var WalletDataProvider_1 = __importDefault(require("../WalletDataProvider"));
|
|
20
20
|
var ThemeProvider_1 = require("../ThemeProvider");
|
|
21
|
+
var Views;
|
|
22
|
+
(function (Views) {
|
|
23
|
+
Views["ACTIVITY"] = "activity";
|
|
24
|
+
Views["SETTING"] = "setting";
|
|
25
|
+
Views["ASSET"] = "asset";
|
|
26
|
+
})(Views || (exports.Views = Views = {}));
|
|
21
27
|
var initialTekWalletContext = {
|
|
22
28
|
isSSO: undefined,
|
|
23
29
|
options: undefined,
|
|
@@ -166,8 +166,8 @@ var shadows = [
|
|
|
166
166
|
"0px 18px 36px rgba(255, 255, 255, 0.1)", // 9
|
|
167
167
|
"0px 18px 36px rgba(255, 255, 255, 0.2)", // 10
|
|
168
168
|
"0px 20px 40px rgba(255, 255, 255, 0.1)", // 11
|
|
169
|
-
"
|
|
170
|
-
"
|
|
169
|
+
"2px 2px 10px 5px rgba(0, 0, 0, 0.1)", // 12
|
|
170
|
+
"1px 1px 10px 2px rgba(0, 0, 0, 0.1)", // 13
|
|
171
171
|
"0px 24px 48px rgba(0, 0, 0, 0.2)", // 14
|
|
172
172
|
"0px 30px 60px rgba(0, 0, 0, 0.1)", // 15
|
|
173
173
|
"0px 30px 60px rgba(0, 0, 0, 0.2)", // 16
|