tek-wallet 0.0.783 → 0.0.784

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.
@@ -7,6 +7,7 @@ export interface ActivitiesTypeSlicePropsType {
7
7
  limitItems?: number;
8
8
  sx?: SxProps;
9
9
  smartListProps?: Partial<SmartListProps>;
10
+ useAction?: boolean;
10
11
  }
11
12
  export declare enum Status {
12
13
  Loading = "loading",
@@ -27,6 +27,8 @@ var react_1 = require("react");
27
27
  var WaitingData_1 = __importDefault(require("../WaitingData"));
28
28
  var SmartList_1 = __importDefault(require("../SmartList"));
29
29
  var TekWalletProvider_1 = require("../../../providers/TekWalletProvider");
30
+ var const_1 = require("../../../providers/ActivitiesProvider/const");
31
+ var useCustomRouter_1 = __importDefault(require("../../../hooks/useCustomRouter"));
30
32
  var Status;
31
33
  (function (Status) {
32
34
  Status["Loading"] = "loading";
@@ -37,8 +39,9 @@ var prefix = "activities_";
37
39
  function ActivitiesTypeSlice(props) {
38
40
  var _a, _b;
39
41
  var theme = (0, ThemeProvider_1.useTheme)();
42
+ var router = (0, useCustomRouter_1.default)();
40
43
  var _c = (0, useActivities_1.default)(), activities = _c.activities, loadActivities = _c.loadActivities, loadOutActivityType = _c.loadOutActivityType;
41
- var type = props.type, isActive = props.isActive, limitItems = props.limitItems, sx = props.sx, smartListProps = props.smartListProps;
44
+ var type = props.type, isActive = props.isActive, limitItems = props.limitItems, sx = props.sx, smartListProps = props.smartListProps, useAction = props.useAction;
42
45
  var options = (0, TekWalletProvider_1.useWalletSetup)().options;
43
46
  var basePath = (options || {}).basePath;
44
47
  var activitiesByType = (0, react_1.useMemo)(function () {
@@ -53,6 +56,9 @@ function ActivitiesTypeSlice(props) {
53
56
  return Status.Filled;
54
57
  return Status.Empty;
55
58
  }, [type, activitiesByType]);
59
+ (0, react_1.useEffect)(function () {
60
+ router.prefetch("".concat(basePath || "", "/tek-wallet"));
61
+ }, [router, basePath]);
56
62
  (0, react_1.useEffect)(function () {
57
63
  if (!isActive || !!activitiesByType)
58
64
  return;
@@ -61,7 +67,12 @@ function ActivitiesTypeSlice(props) {
61
67
  var loadMore = (0, react_1.useCallback)(function () {
62
68
  loadActivities(type.slug);
63
69
  }, [loadActivities, type.slug]);
64
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ width: "100%", height: "100%", display: "flex" }, sx), children: [status === Status.Loading && ((0, jsx_runtime_1.jsx)(WaitingData_1.default, { sx: { marginBottom: "auto", p: theme.mixins.customPadding.p16 } })), status === Status.Empty && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { marginBottom: "auto", marginTop: "4rem" }, icon: (0, getIcon_1.default)(prefix + "empty_" + type.slug), description: "No ".concat((_a = type.name) === null || _a === void 0 ? void 0 : _a.toLowerCase(), " activity") })), status === Status.Filled && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(SmartList_1.default, { loadMoreData: loadMore, sx: __assign({ px: theme.mixins.customPadding.p16 }, smartListProps === null || smartListProps === void 0 ? void 0 : smartListProps.sx), hasMore: !loadOutActivityType[type.slug] &&
70
+ var gotoHome = function () {
71
+ router.push("".concat(basePath || "", "/tek-wallet"));
72
+ };
73
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ width: "100%", height: "100%", display: "flex" }, sx), children: [status === Status.Loading && ((0, jsx_runtime_1.jsx)(WaitingData_1.default, { sx: { marginBottom: "auto", p: theme.mixins.customPadding.p16 }, numberOfSkeleton: 8 })), status === Status.Empty && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { action: useAction && type.slug === const_1.ACTIVITIES_TYPE_ALL.slug ? gotoHome : undefined, actionText: "Start your journey", sx: { marginBottom: "auto", marginTop: "4rem", px: theme.mixins.customPadding.p16 }, icon: (0, getIcon_1.default)(prefix + "empty_" + type.slug), description: type.slug === const_1.ACTIVITIES_TYPE_ALL.slug
74
+ ? "You haven't any activity yet"
75
+ : "No ".concat((_a = type.name) === null || _a === void 0 ? void 0 : _a.toLowerCase(), " activity") })), status === Status.Filled && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(SmartList_1.default, { loadMoreData: loadMore, sx: __assign({ px: theme.mixins.customPadding.p16 }, smartListProps === null || smartListProps === void 0 ? void 0 : smartListProps.sx), hasMore: !loadOutActivityType[type.slug] &&
65
76
  ((activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.length) || 0) < (limitItems || Infinity), loadingComponent: (0, jsx_runtime_1.jsx)(WaitingData_1.default, { numberOfSkeleton: 4, sx: {
66
77
  marginTop: theme.mixins.customMargin.m12,
67
78
  } }), bodySx: __assign({ pb: theme.mixins.customPadding.p32, pt: theme.mixins.customPadding.p16 }, smartListProps === null || smartListProps === void 0 ? void 0 : smartListProps.bodySx), children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: (_b = activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.slice(0, limitItems)) === null || _b === void 0 ? void 0 : _b.map(function (activity, index) {
@@ -21,6 +21,6 @@ var Text_1 = __importDefault(require("../Text"));
21
21
  var Button_1 = __importDefault(require("../Button"));
22
22
  function EmptyData(props) {
23
23
  var theme = (0, ThemeProvider_1.useTheme)();
24
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center", justifyContent: "center" }), props.sx), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 62, height: 62 }, children: (0, jsx_runtime_1.jsxs)("svg", { width: "63", height: "62", viewBox: "0 0 63 62", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { d: "M46.0312 23.25H21.7544C21.4638 23.25 21.1925 23.1241 21.0084 22.9012L17.3272 18.4837C16.775 17.8153 15.9612 17.4375 15.0991 17.4375H5.34375C3.74531 17.4375 2.4375 18.7453 2.4375 20.3438V59.0938C2.4375 59.4231 2.61188 59.7331 2.89281 59.9172C3.04781 60.0141 3.23188 60.0625 3.40625 60.0625C3.55156 60.0625 3.68719 60.0334 3.82281 59.9656L48.3853 38.6531C48.7244 38.4884 48.9375 38.1494 48.9375 37.7812V26.1562C48.9375 24.5578 47.6297 23.25 46.0312 23.25Z", fill: "#A3A3A3" }), (0, jsx_runtime_1.jsx)("path", { d: "M60.2912 37.7522C59.9425 37.1613 59.3225 36.8125 58.6347 36.8125H15.535C14.8278 36.8125 14.1787 37.2 13.8397 37.8297L2.55373 58.6287C2.38904 58.9291 2.39873 59.2972 2.5731 59.5878C2.74748 59.8784 3.06717 60.0625 3.40623 60.0625H46.9709C48.3853 60.0625 49.6834 59.2875 50.3615 58.0378L60.3203 39.6703C60.6497 39.06 60.64 38.3431 60.2815 37.7522H60.2912Z", fill: "#044C2F" }), (0, jsx_runtime_1.jsx)("path", { d: "M27.625 50.375H16.9688C16.4359 50.375 16 49.9391 16 49.4062C16 48.8734 16.4359 48.4375 16.9688 48.4375H27.625C28.1578 48.4375 28.5938 48.8734 28.5938 49.4062C28.5938 49.9391 28.1578 50.375 27.625 50.375Z", fill: "#ECF4E9" }), (0, jsx_runtime_1.jsx)("path", { d: "M31.5 55.2188H14.0625C13.5297 55.2188 13.0938 54.7828 13.0938 54.25C13.0938 53.7172 13.5297 53.2812 14.0625 53.2812H31.5C32.0328 53.2812 32.4688 53.7172 32.4688 54.25C32.4688 54.7828 32.0328 55.2188 31.5 55.2188Z", fill: "#ECF4E9" }), (0, jsx_runtime_1.jsx)("path", { d: "M39.25 1.9375C31.7713 1.9375 25.6875 8.02125 25.6875 15.5C25.6875 21.7969 30.0663 27.2897 36.1597 28.7041L38.4169 32.4628C38.5912 32.7534 38.9109 32.9375 39.25 32.9375C39.5891 32.9375 39.9088 32.7631 40.0831 32.4628L42.3403 28.7041C48.4337 27.2897 52.8125 21.7969 52.8125 15.5C52.8125 8.02125 46.7288 1.9375 39.25 1.9375Z", fill: "#E5E6E6" }), (0, jsx_runtime_1.jsx)("path", { d: "M44.7817 9.96891C44.4039 9.59109 43.7936 9.59109 43.4158 9.96891L39.2598 14.1248L35.1039 9.96891C34.7261 9.59109 34.1158 9.59109 33.7379 9.96891C33.3601 10.3467 33.3601 10.957 33.7379 11.3348L37.8939 15.4908L33.7379 19.6467C33.3601 20.0245 33.3601 20.6348 33.7379 21.0127C33.9317 21.2064 34.1739 21.2936 34.4258 21.2936C34.6776 21.2936 34.9198 21.1967 35.1136 21.0127L39.2695 16.8567L43.4254 21.0127C43.6192 21.2064 43.8614 21.2936 44.1133 21.2936C44.3651 21.2936 44.6073 21.1967 44.8011 21.0127C45.1789 20.6348 45.1789 20.0245 44.8011 19.6467L40.6451 15.4908L44.8011 11.3348C45.1789 10.957 45.1789 10.3467 44.8011 9.96891H44.7817Z", fill: "#044C2F" })] }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: props.title }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: props.description })] }), props.action && (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: props.action, children: props.actionText })] }));
24
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center", justifyContent: "center" }), props.sx), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 62, height: 62 }, children: (0, jsx_runtime_1.jsxs)("svg", { width: "63", height: "62", viewBox: "0 0 63 62", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { d: "M46.0312 23.25H21.7544C21.4638 23.25 21.1925 23.1241 21.0084 22.9012L17.3272 18.4837C16.775 17.8153 15.9612 17.4375 15.0991 17.4375H5.34375C3.74531 17.4375 2.4375 18.7453 2.4375 20.3438V59.0938C2.4375 59.4231 2.61188 59.7331 2.89281 59.9172C3.04781 60.0141 3.23188 60.0625 3.40625 60.0625C3.55156 60.0625 3.68719 60.0334 3.82281 59.9656L48.3853 38.6531C48.7244 38.4884 48.9375 38.1494 48.9375 37.7812V26.1562C48.9375 24.5578 47.6297 23.25 46.0312 23.25Z", fill: "#A3A3A3" }), (0, jsx_runtime_1.jsx)("path", { d: "M60.2912 37.7522C59.9425 37.1613 59.3225 36.8125 58.6347 36.8125H15.535C14.8278 36.8125 14.1787 37.2 13.8397 37.8297L2.55373 58.6287C2.38904 58.9291 2.39873 59.2972 2.5731 59.5878C2.74748 59.8784 3.06717 60.0625 3.40623 60.0625H46.9709C48.3853 60.0625 49.6834 59.2875 50.3615 58.0378L60.3203 39.6703C60.6497 39.06 60.64 38.3431 60.2815 37.7522H60.2912Z", fill: "#044C2F" }), (0, jsx_runtime_1.jsx)("path", { d: "M27.625 50.375H16.9688C16.4359 50.375 16 49.9391 16 49.4062C16 48.8734 16.4359 48.4375 16.9688 48.4375H27.625C28.1578 48.4375 28.5938 48.8734 28.5938 49.4062C28.5938 49.9391 28.1578 50.375 27.625 50.375Z", fill: "#ECF4E9" }), (0, jsx_runtime_1.jsx)("path", { d: "M31.5 55.2188H14.0625C13.5297 55.2188 13.0938 54.7828 13.0938 54.25C13.0938 53.7172 13.5297 53.2812 14.0625 53.2812H31.5C32.0328 53.2812 32.4688 53.7172 32.4688 54.25C32.4688 54.7828 32.0328 55.2188 31.5 55.2188Z", fill: "#ECF4E9" }), (0, jsx_runtime_1.jsx)("path", { d: "M39.25 1.9375C31.7713 1.9375 25.6875 8.02125 25.6875 15.5C25.6875 21.7969 30.0663 27.2897 36.1597 28.7041L38.4169 32.4628C38.5912 32.7534 38.9109 32.9375 39.25 32.9375C39.5891 32.9375 39.9088 32.7631 40.0831 32.4628L42.3403 28.7041C48.4337 27.2897 52.8125 21.7969 52.8125 15.5C52.8125 8.02125 46.7288 1.9375 39.25 1.9375Z", fill: "#E5E6E6" }), (0, jsx_runtime_1.jsx)("path", { d: "M44.7817 9.96891C44.4039 9.59109 43.7936 9.59109 43.4158 9.96891L39.2598 14.1248L35.1039 9.96891C34.7261 9.59109 34.1158 9.59109 33.7379 9.96891C33.3601 10.3467 33.3601 10.957 33.7379 11.3348L37.8939 15.4908L33.7379 19.6467C33.3601 20.0245 33.3601 20.6348 33.7379 21.0127C33.9317 21.2064 34.1739 21.2936 34.4258 21.2936C34.6776 21.2936 34.9198 21.1967 35.1136 21.0127L39.2695 16.8567L43.4254 21.0127C43.6192 21.2064 43.8614 21.2936 44.1133 21.2936C44.3651 21.2936 44.6073 21.1967 44.8011 21.0127C45.1789 20.6348 45.1789 20.0245 44.8011 19.6467L40.6451 15.4908L44.8011 11.3348C45.1789 10.957 45.1789 10.3467 44.8011 9.96891H44.7817Z", fill: "#044C2F" })] }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: props.title }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: props.description })] }), props.action && ((0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: props.action, fullWidth: true, children: props.actionText }))] }));
25
25
  }
26
26
  exports.default = EmptyData;
@@ -1,5 +1,5 @@
1
1
  import { GeneralProps } from "../../../types/ui";
2
- import { TonTransferUrlParams } from "../../../utils/parseTonTransferUrl";
2
+ import { NetworkData } from "../../../services/axios/type";
3
3
  export interface SendExternalParams {
4
4
  address: string;
5
5
  network: string[];
@@ -10,8 +10,8 @@ interface ScanQRToSendProps extends GeneralProps {
10
10
  overrideToken?: string;
11
11
  transferInternalPath?: string;
12
12
  transferExternalPath?: string;
13
- gotoTransferInternalOverride?: (params?: TonTransferUrlParams) => void;
14
- gotoTransferExternalOverride?: (params?: SendExternalParams) => void;
13
+ gotoTransferInternalOverride?: (address?: string) => void;
14
+ gotoTransferExternalOverride?: (address?: string, network?: NetworkData[]) => void;
15
15
  }
16
16
  export type ScanQRToSendRef = {
17
17
  open: () => void;
@@ -56,7 +56,6 @@ var jsx_runtime_1 = require("react/jsx-runtime");
56
56
  var react_1 = require("react");
57
57
  var Text_1 = __importDefault(require("../Text"));
58
58
  var material_1 = require("@mui/material");
59
- var RequireConnect_1 = __importDefault(require("../RequireConnect"));
60
59
  var QrCodeReader_1 = __importDefault(require("../QrCodeReader"));
61
60
  var validate_wallet_address_service_1 = __importDefault(require("../../../services/axios/validate-wallet-address-service"));
62
61
  var parseTonTransferUrl_1 = __importDefault(require("../../../utils/parseTonTransferUrl"));
@@ -78,8 +77,10 @@ exports.ScanQRToSend = (0, react_1.forwardRef)(function (props, ref) {
78
77
  var drawerRef = (0, react_1.useRef)(null);
79
78
  var theme = (0, ThemeProvider_1.useTheme)();
80
79
  var router = (0, navigation_1.useRouter)();
81
- var _a = (0, react_1.useState)(), paramsData = _a[0], setParamsData = _a[1];
82
- var _b = (0, react_1.useState)(), infoDialogContent = _b[0], setInfoDialogContent = _b[1];
80
+ var masterWalletAddress = (0, react_1.useRef)(undefined);
81
+ var blockchainWalletAddress = (0, react_1.useRef)(undefined);
82
+ var networks = (0, react_1.useRef)(undefined);
83
+ var _a = (0, react_1.useState)(), infoDialogContent = _a[0], setInfoDialogContent = _a[1];
83
84
  var scannerAllQrCodeRef = (0, react_1.useRef)(null);
84
85
  var loadingDropRef = (0, react_1.useRef)(null);
85
86
  var suggestUseTransferInternalDialogRef = (0, react_1.useRef)(null);
@@ -98,35 +99,33 @@ exports.ScanQRToSend = (0, react_1.forwardRef)(function (props, ref) {
98
99
  var handleClearInfoDialogContent = function () {
99
100
  setInfoDialogContent(undefined);
100
101
  };
101
- var gotoTransferInternal = function (params) {
102
- var theParams = params !== null && params !== void 0 ? params : paramsData;
102
+ var gotoTransferInternal = function () {
103
103
  if (gotoTransferInternalOverride) {
104
- gotoTransferInternalOverride(theParams);
104
+ gotoTransferInternalOverride(masterWalletAddress.current);
105
105
  return;
106
106
  }
107
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
108
- var urlParams = theParams ? new URLSearchParams(theParams) : new URLSearchParams();
109
- var url = "".concat(internalPath, "?").concat(new URLSearchParams(urlParams).toString());
107
+ var params = new URLSearchParams(window.location.search);
108
+ params.set("address", masterWalletAddress.current || "");
109
+ var url = "".concat(internalPath, "?").concat(params.toString());
110
110
  router.push(url);
111
111
  };
112
- var gotoTransferExternal = function (params) {
113
- var theParams = params;
112
+ var gotoTransferExternal = function () {
114
113
  if (gotoTransferExternalOverride) {
115
- gotoTransferExternalOverride(theParams);
114
+ gotoTransferExternalOverride(blockchainWalletAddress.current, networks.current);
116
115
  return;
117
116
  }
118
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
119
- var urlParams = theParams ? new URLSearchParams(theParams) : new URLSearchParams();
120
- var url = "".concat(externalPath, "?").concat(new URLSearchParams(urlParams).toString());
117
+ var params = new URLSearchParams(window.location.search);
118
+ params.set("address", blockchainWalletAddress.current || "");
119
+ var url = "".concat(externalPath, "?").concat(params.toString());
121
120
  router.push(url);
122
121
  };
123
122
  var handleScanAllQrCode = function (result) { return __awaiter(void 0, void 0, void 0, function () {
124
- var text, isReceiveInternal, tonTransferParam, validateResult, message, error_1;
125
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
126
- return __generator(this, function (_k) {
127
- switch (_k.label) {
123
+ var text, isReceiveInternal, tonTransferParam, validateResult, message, data, error_1;
124
+ var _a, _b, _c, _d, _e, _f;
125
+ return __generator(this, function (_g) {
126
+ switch (_g.label) {
128
127
  case 0:
129
- _k.trys.push([0, 3, , 4]);
128
+ _g.trys.push([0, 3, , 4]);
130
129
  (_a = scannerAllQrCodeRef.current) === null || _a === void 0 ? void 0 : _a.close();
131
130
  if (!result) return [3 /*break*/, 2];
132
131
  text = (_b = result === null || result === void 0 ? void 0 : result[0]) === null || _b === void 0 ? void 0 : _b.rawValue;
@@ -134,15 +133,17 @@ exports.ScanQRToSend = (0, react_1.forwardRef)(function (props, ref) {
134
133
  tonTransferParam = isReceiveInternal
135
134
  ? JSON.parse(text)
136
135
  : (0, parseTonTransferUrl_1.default)(text);
137
- setParamsData(tonTransferParam);
138
136
  (_c = loadingDropRef.current) === null || _c === void 0 ? void 0 : _c.open();
139
137
  return [4 /*yield*/, (0, validate_wallet_address_service_1.default)({
140
138
  address: tonTransferParam === null || tonTransferParam === void 0 ? void 0 : tonTransferParam.address,
141
139
  })];
142
140
  case 1:
143
- validateResult = _k.sent();
141
+ validateResult = _g.sent();
144
142
  (_d = loadingDropRef.current) === null || _d === void 0 ? void 0 : _d.close();
145
- message = validateResult.message;
143
+ message = validateResult.message, data = validateResult.data;
144
+ masterWalletAddress.current = (data === null || data === void 0 ? void 0 : data.master_wallet_address) || undefined;
145
+ blockchainWalletAddress.current = (data === null || data === void 0 ? void 0 : data.address) || undefined;
146
+ networks.current = (data === null || data === void 0 ? void 0 : data.networks) || undefined;
146
147
  if (message === type_1.ValidateWalletAddressResultMessage.ERROR) {
147
148
  setInfoDialogContent("Something went wrong, please try again");
148
149
  return [2 /*return*/];
@@ -160,42 +161,39 @@ exports.ScanQRToSend = (0, react_1.forwardRef)(function (props, ref) {
160
161
  return [2 /*return*/];
161
162
  }
162
163
  if (message === type_1.ValidateWalletAddressResultMessage.INTERNAL_WALLET) {
163
- gotoTransferInternal(tonTransferParam);
164
+ gotoTransferInternal();
164
165
  }
165
166
  if (message === type_1.ValidateWalletAddressResultMessage.EXTERNAL_WALLET) {
166
- gotoTransferExternal({
167
- address: ((_f = validateResult === null || validateResult === void 0 ? void 0 : validateResult.data) === null || _f === void 0 ? void 0 : _f.address) || "",
168
- network: ((_h = (_g = validateResult === null || validateResult === void 0 ? void 0 : validateResult.data) === null || _g === void 0 ? void 0 : _g.networks) === null || _h === void 0 ? void 0 : _h.map(function (item) { return item.slug; })) || [],
169
- });
167
+ gotoTransferExternal();
170
168
  }
171
- _k.label = 2;
169
+ _g.label = 2;
172
170
  case 2: return [3 /*break*/, 4];
173
171
  case 3:
174
- error_1 = _k.sent();
175
- (_j = loadingDropRef.current) === null || _j === void 0 ? void 0 : _j.close();
172
+ error_1 = _g.sent();
173
+ (_f = loadingDropRef.current) === null || _f === void 0 ? void 0 : _f.close();
176
174
  console.error(error_1);
177
175
  return [3 /*break*/, 4];
178
176
  case 4: return [2 /*return*/];
179
177
  }
180
178
  });
181
179
  }); };
182
- return ((0, jsx_runtime_1.jsx)(RequireConnect_1.default, { sx: sx, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(QrCodeReader_1.default, { sx: sx, ref: scannerAllQrCodeRef, onResult: handleScanAllQrCode, className: className, children: children }), (0, jsx_runtime_1.jsx)(AppBackDrop_1.default, { ref: loadingDropRef }), (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: {
183
- textAlign: "center",
184
- display: "inline-block",
185
- width: "100%",
186
- }, children: infoDialogContent }), actions: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.dialogActionsOk), { width: "100%", display: "inline-block" }), onClick: handleClearInfoDialogContent, children: "Ok" }) }) }), (0, jsx_runtime_1.jsx)(AppDialog_1.default, { ref: suggestUseTransferInternalDialogRef, children: (0, jsx_runtime_1.jsx)(DialogContentLayout_1.default, { content: "This wallet is supported send internally, use it for faster transaction?", actions: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
187
- display: "grid",
188
- gridTemplateColumns: "1fr auto 1fr",
189
- gap: theme.mixins.gaps.g8,
190
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.dialogActionsCancel), { width: "100%" }), onClick: function () {
191
- var _a;
192
- gotoTransferExternal();
193
- (_a = suggestUseTransferInternalDialogRef.current) === null || _a === void 0 ? void 0 : _a.close();
194
- }, children: "Keep external" }), (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", variant: "middle", flexItem: true }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.dialogActionsOk), { width: "100%" }), onClick: function () {
195
- var _a;
196
- gotoTransferInternal();
197
- (_a = suggestUseTransferInternalDialogRef.current) === null || _a === void 0 ? void 0 : _a.close();
198
- }, children: "Ok" })] }) }) })] }) }));
180
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(QrCodeReader_1.default, { sx: sx, ref: scannerAllQrCodeRef, onResult: handleScanAllQrCode, className: className, children: children }), (0, jsx_runtime_1.jsx)(AppBackDrop_1.default, { ref: loadingDropRef }), (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: {
181
+ textAlign: "center",
182
+ display: "inline-block",
183
+ width: "100%",
184
+ }, children: infoDialogContent }), actions: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.dialogActionsOk), { width: "100%", display: "inline-block" }), onClick: handleClearInfoDialogContent, children: "Ok" }) }) }), (0, jsx_runtime_1.jsx)(AppDialog_1.default, { ref: suggestUseTransferInternalDialogRef, children: (0, jsx_runtime_1.jsx)(DialogContentLayout_1.default, { content: "This wallet is supported send internally, use it for faster transaction?", actions: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
185
+ display: "grid",
186
+ gridTemplateColumns: "1fr auto 1fr",
187
+ gap: theme.mixins.gaps.g8,
188
+ }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.dialogActionsCancel), { width: "100%" }), onClick: function () {
189
+ var _a;
190
+ gotoTransferExternal();
191
+ (_a = suggestUseTransferInternalDialogRef.current) === null || _a === void 0 ? void 0 : _a.close();
192
+ }, children: "Keep external" }), (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", variant: "middle", flexItem: true }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.dialogActionsOk), { width: "100%" }), onClick: function () {
193
+ var _a;
194
+ gotoTransferInternal();
195
+ (_a = suggestUseTransferInternalDialogRef.current) === null || _a === void 0 ? void 0 : _a.close();
196
+ }, children: "Ok" })] }) }) })] }));
199
197
  });
200
198
  exports.ScanQRToSend.displayName = "ScanQRToSend";
201
199
  exports.default = exports.ScanQRToSend;
@@ -23,7 +23,7 @@ exports.IC_ARROW_BLACK_DROP = ((0, jsx_runtime_1.jsx)("svg", { width: "9", heigh
23
23
  exports.IC_TRASH = ((0, jsx_runtime_1.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M12.2833 7.50043L11.995 15.0004M8.005 15.0004L7.71667 7.50043M16.0233 4.82543C16.3083 4.86877 16.5917 4.9146 16.875 4.96377M16.0233 4.82543L15.1333 16.3946C15.097 16.8656 14.8842 17.3056 14.5375 17.6265C14.1908 17.9474 13.7358 18.1256 13.2633 18.1254H6.73667C6.26425 18.1256 5.80919 17.9474 5.46248 17.6265C5.11578 17.3056 4.90299 16.8656 4.86667 16.3946L3.97667 4.82543M16.0233 4.82543C15.0616 4.68003 14.0948 4.56968 13.125 4.4946M3.97667 4.82543C3.69167 4.86793 3.40833 4.91377 3.125 4.96293M3.97667 4.82543C4.93844 4.68003 5.9052 4.56968 6.875 4.4946M13.125 4.4946V3.73127C13.125 2.74793 12.3667 1.92793 11.3833 1.8971C10.4613 1.86763 9.53865 1.86763 8.61667 1.8971C7.63333 1.92793 6.875 2.74877 6.875 3.73127V4.4946M13.125 4.4946C11.0448 4.33383 8.95523 4.33383 6.875 4.4946", stroke: "#044C2F", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) }));
24
24
  exports.IC_CHEVRON_LEFT = ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#000000", width: "800px", height: "800px", viewBox: "0 0 52 52", enableBackground: "new 0 0 52 52", xmlSpace: "preserve", children: (0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("path", { d: "M34.2,47.7L13.4,27.2c-0.6-0.6-0.6-1.6,0-2.2L34.2,4.5c0.6-0.6,1.6-0.6,2.2,0l2.2,2.2 c0.6,0.6,0.6,1.6,0,2.2L22.1,25c-0.6,0.6-0.6,1.6,0,2.2l16.3,16.1c0.6,0.6,0.6,1.6,0,2.2l-2.2,2.2C35.7,48.2,34.8,48.2,34.2,47.7z" }) }) }));
25
25
  exports.IC_CHEVRON_RIGHT = ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#000000", width: "800px", height: "800px", viewBox: "0 0 52 52", enableBackground: "new 0 0 52 52", xmlSpace: "preserve", children: (0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("path", { d: "M17.9,4.4l20.7,20.5c0.6,0.6,0.6,1.6,0,2.2L17.9,47.6c-0.6,0.6-1.6,0.6-2.2,0l-2.2-2.2 c-0.6-0.6-0.6-1.6,0-2.2l16.3-16.1c0.6-0.6,0.6-1.6,0-2.2L13.6,8.8c-0.6-0.6-0.6-1.6,0-2.2l2.2-2.2C16.4,3.9,17.3,3.9,17.9,4.4z" }) }) }));
26
- exports.IC_SUCCESS = ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "#01FF00", children: (0, jsx_runtime_1.jsx)("path", { d: "M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q65 0 123 19t107 53l-58 59q-38-24-81-37.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160q133 0 226.5-93.5T800-480q0-18-2-36t-6-35l65-65q11 32 17 66t6 70q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm-56-216L254-466l56-56 114 114 400-401 56 56-456 457Z" }) }));
26
+ exports.IC_SUCCESS = ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "#1EA031", children: (0, jsx_runtime_1.jsx)("path", { d: "M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q65 0 123 19t107 53l-58 59q-38-24-81-37.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160q133 0 226.5-93.5T800-480q0-18-2-36t-6-35l65-65q11 32 17 66t6 70q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm-56-216L254-466l56-56 114 114 400-401 56 56-456 457Z" }) }));
27
27
  exports.IC_ERROR = ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "#FF434E", children: (0, jsx_runtime_1.jsx)("path", { d: "M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z" }) }));
28
28
  exports.IC_RECEIVE_INTERNAL = ((0, jsx_runtime_1.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M17.5 10C17.5 9.50272 17.3025 9.02581 16.9508 8.67417C16.5992 8.32254 16.1223 8.125 15.625 8.125H12.5C12.5 8.78804 12.2366 9.42393 11.7678 9.89277C11.2989 10.3616 10.663 10.625 10 10.625C9.33696 10.625 8.70107 10.3616 8.23223 9.89277C7.76339 9.42393 7.5 8.78804 7.5 8.125H4.375C3.87772 8.125 3.40081 8.32254 3.04917 8.67417C2.69754 9.02581 2.5 9.50272 2.5 10M17.5 10V15C17.5 15.4973 17.3025 15.9742 16.9508 16.3258C16.5992 16.6775 16.1223 16.875 15.625 16.875H4.375C3.87772 16.875 3.40081 16.6775 3.04917 16.3258C2.69754 15.9742 2.5 15.4973 2.5 15V10M17.5 10V7.5M2.5 10V7.5M17.5 7.5C17.5 7.00272 17.3025 6.52581 16.9508 6.17417C16.5992 5.82254 16.1223 5.625 15.625 5.625H4.375C3.87772 5.625 3.40081 5.82254 3.04917 6.17417C2.69754 6.52581 2.5 7.00272 2.5 7.5M17.5 7.5V5C17.5 4.50272 17.3025 4.02581 16.9508 3.67417C16.5992 3.32254 16.1223 3.125 15.625 3.125H4.375C3.87772 3.125 3.40081 3.32254 3.04917 3.67417C2.69754 4.02581 2.5 4.50272 2.5 5V7.5", stroke: "#044C2F", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) }));
29
29
  exports.IC_RECEIVE_EXTERNAL = ((0, jsx_runtime_1.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M10 5V15M7.5 12.6517L8.2325 13.2008C9.20833 13.9333 10.7908 13.9333 11.7675 13.2008C12.7442 12.4683 12.7442 11.2817 11.7675 10.5492C11.28 10.1825 10.64 10 10 10C9.39583 10 8.79167 9.81667 8.33083 9.45083C7.40917 8.71833 7.40917 7.53167 8.33083 6.79917C9.2525 6.06667 10.7475 6.06667 11.6692 6.79917L12.015 7.07417M17.5 10C17.5 10.9849 17.306 11.9602 16.9291 12.8701C16.5522 13.7801 15.9997 14.6069 15.3033 15.3033C14.6069 15.9997 13.7801 16.5522 12.8701 16.9291C11.9602 17.306 10.9849 17.5 10 17.5C9.01509 17.5 8.03982 17.306 7.12987 16.9291C6.21993 16.5522 5.39314 15.9997 4.6967 15.3033C4.00026 14.6069 3.44781 13.7801 3.0709 12.8701C2.69399 11.9602 2.5 10.9849 2.5 10C2.5 8.01088 3.29018 6.10322 4.6967 4.6967C6.10322 3.29018 8.01088 2.5 10 2.5C11.9891 2.5 13.8968 3.29018 15.3033 4.6967C16.7098 6.10322 17.5 8.01088 17.5 10Z", stroke: "#044C2F", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) }));
@@ -49,6 +49,6 @@ var TokenSelection = function (props) {
49
49
  ? "".concat(theme.palette.background.tertiary)
50
50
  : "".concat(theme.palette.background.white16), border: "1px solid", backdropFilter: "blur(12px)", borderColor: active ? "".concat(theme.palette.primary.main) : "".concat(theme.palette.border.accent3), borderRadius: theme.mixins.customRadius.r16, padding: theme.mixins.customPadding.p16, display: "flex", alignItems: "center", cursor: "pointer" }, sx) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 20, src: tokenData === null || tokenData === void 0 ? void 0 : tokenData.link, sx: {
51
51
  borderRadius: theme.mixins.customRadius.full,
52
- } }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g2 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.value, children: tokenData === null || tokenData === void 0 ? void 0 : tokenData.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.valueDescription, children: tokenData === null || tokenData === void 0 ? void 0 : tokenData.full_name })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { marginLeft: "auto", alignItems: "end" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.value, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: balance }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.valueDescription), { color: theme.palette.text.accent }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: balanceInUSD, start: "~ $" }) })] })] })));
52
+ } }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g2 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { whiteSpace: "nowrap" }), children: tokenData === null || tokenData === void 0 ? void 0 : tokenData.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.valueDescription, children: tokenData === null || tokenData === void 0 ? void 0 : tokenData.full_name })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { marginLeft: "auto", alignItems: "end" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.value, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: balance }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.valueDescription), { color: theme.palette.text.accent }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: balanceInUSD, start: "~ $" }) })] })] })));
53
53
  };
54
54
  exports.default = TokenSelection;
@@ -1,4 +1,4 @@
1
- import { SortBalance } from "../../../..";
1
+ import { SortBalance } from "..";
2
2
  interface SortByBalanceProps {
3
3
  sortBalance: SortBalance;
4
4
  setSortBalance: (sortBalance: SortBalance) => void;
@@ -17,10 +17,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.default = SortByBalance;
18
18
  var jsx_runtime_1 = require("react/jsx-runtime");
19
19
  var material_1 = require("@mui/material");
20
- var __1 = require("../../../..");
21
20
  var Text_1 = __importDefault(require("../../Text"));
22
21
  var SvgPath_1 = require("../../SvgPath");
23
22
  var ThemeProvider_1 = require("../../../../providers/ThemeProvider");
23
+ var __1 = require("..");
24
24
  function SortByBalance(props) {
25
25
  var sortBalance = props.sortBalance, setSortBalance = props.setSortBalance;
26
26
  var theme = (0, ThemeProvider_1.useTheme)();
@@ -16,61 +16,58 @@ var ThemeProvider_1 = require("../../../providers/ThemeProvider");
16
16
  var react_2 = require("swiper/react");
17
17
  var ActivitiesTypeSlice_1 = __importDefault(require("../../ui/ActivitiesTypeSlice"));
18
18
  var TekWalletProvider_1 = require("../../../providers/TekWalletProvider");
19
- var const_1 = require("../../../providers/ActivitiesProvider/const");
20
- var EmptyData_1 = __importDefault(require("../../ui/EmptyData"));
21
19
  var ActivityView = function (props) {
22
- var _a;
23
20
  var sx = props.sx;
24
21
  var theme = (0, ThemeProvider_1.useTheme)();
25
22
  var options = (0, TekWalletProvider_1.useWalletSetup)().options;
26
23
  var hideBackButtons = (options || {}).hideBackButtons;
27
- var _b = (0, useActivities_1.default)(), activityTypes = _b.activityTypes, activities = _b.activities;
28
- var _c = (0, react_1.useState)(0), activeTab = _c[0], setActiveTab = _c[1];
24
+ var _a = (0, useActivities_1.default)(), activityTypes = _a.activityTypes, activities = _a.activities;
25
+ var _b = (0, react_1.useState)(0), activeTab = _b[0], setActiveTab = _b[1];
29
26
  var handleSlideChange = function (index) {
30
27
  setActiveTab(index);
31
28
  };
32
- var hasActivities = (0, react_1.useMemo)(function () {
29
+ var activitiesLength = (0, react_1.useMemo)(function () {
33
30
  var _a;
34
- return activities && ((_a = Object.values(activities)) === null || _a === void 0 ? void 0 : _a.flat().length) > 0;
31
+ return activities && ((_a = Object.values(activities)) === null || _a === void 0 ? void 0 : _a.flat().length);
35
32
  }, [activities]);
36
- return ((0, jsx_runtime_1.jsxs)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Activities", hideBack: !!(hideBackButtons === null || hideBackButtons === void 0 ? void 0 : hideBackButtons.activity) }), sx: sx, children: [((_a = activities === null || activities === void 0 ? void 0 : activities[const_1.ACTIVITIES_TYPE_ALL.slug]) === null || _a === void 0 ? void 0 : _a.length) === 0 && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { marginBottom: "auto", marginTop: "4rem" }, description: "You haven't any activity yet" })), (!!hasActivities || !activities) && ((0, jsx_runtime_1.jsx)(SwiperControlled_1.default
33
+ return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Activities", hideBack: !!(hideBackButtons === null || hideBackButtons === void 0 ? void 0 : hideBackButtons.activity) }), sx: sx, children: (0, jsx_runtime_1.jsx)(SwiperControlled_1.default
34
+ // tabParamName="activity-tab"
35
+ , {
37
36
  // tabParamName="activity-tab"
38
- , {
39
- // tabParamName="activity-tab"
40
- swiperProps: {
41
- slidesPerView: 1,
42
- spaceBetween: 20,
43
- }, tabsSx: {
44
- display: hasActivities ? "flex" : "none",
45
- }, onTabChange: handleSlideChange, tabs: activityTypes === null || activityTypes === void 0 ? void 0 : activityTypes.map(function (type, index) {
46
- return ((0, jsx_runtime_1.jsx)(material_1.Tab, { label: type.name, value: index, "data-index": index, sx: {
47
- padding: "".concat(theme.mixins.customPadding.p8, " ").concat(theme.mixins.customPadding.p16),
48
- minHeight: "unset",
49
- minWidth: "unset",
50
- textTransform: "capitalize",
51
- color: theme.palette.text.accent2,
52
- transition: "all 0.3s linear",
53
- fontSize: theme.typography.fontSize12,
54
- borderColor: "currentcolor",
55
- "&.Mui-selected": {
56
- color: theme.palette.text.primary,
57
- },
58
- "&.Mui-selected::after": {
59
- content: "''",
60
- position: "absolute",
61
- bottom: 0,
62
- left: 0,
63
- },
64
- } }, index));
65
- }), sx: {
66
- height: "100%",
67
- }, swiperStyle: {
68
- flex: 1,
69
- }, children: activityTypes === null || activityTypes === void 0 ? void 0 : activityTypes.map(function (type, index) {
70
- return ((0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: {
71
- position: "relative",
72
- }, children: (index === activeTab || index === activeTab - 1 || index === activeTab + 1) && ((0, jsx_runtime_1.jsx)(ActivitiesTypeSlice_1.default, { type: type, isActive: activeTab === index })) }, index));
73
- }) }))] }));
37
+ swiperProps: {
38
+ slidesPerView: 1,
39
+ spaceBetween: 20,
40
+ }, tabsSx: {
41
+ display: activitiesLength ? "flex" : "none",
42
+ }, onTabChange: handleSlideChange, tabs: activityTypes === null || activityTypes === void 0 ? void 0 : activityTypes.map(function (type, index) {
43
+ return ((0, jsx_runtime_1.jsx)(material_1.Tab, { label: type.name, value: index, "data-index": index, sx: {
44
+ padding: "".concat(theme.mixins.customPadding.p8, " ").concat(theme.mixins.customPadding.p16),
45
+ minHeight: "unset",
46
+ minWidth: "unset",
47
+ textTransform: "capitalize",
48
+ color: theme.palette.text.accent2,
49
+ transition: "all 0.3s linear",
50
+ fontSize: theme.typography.fontSize12,
51
+ borderColor: "currentcolor",
52
+ "&.Mui-selected": {
53
+ color: theme.palette.text.primary,
54
+ },
55
+ "&.Mui-selected::after": {
56
+ content: "''",
57
+ position: "absolute",
58
+ bottom: 0,
59
+ left: 0,
60
+ },
61
+ } }, index));
62
+ }), sx: {
63
+ height: "100%",
64
+ }, swiperStyle: {
65
+ flex: 1,
66
+ }, children: activityTypes === null || activityTypes === void 0 ? void 0 : activityTypes.map(function (type, index) {
67
+ return ((0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: {
68
+ position: "relative",
69
+ }, children: (index === activeTab || index === activeTab - 1 || index === activeTab + 1) && ((0, jsx_runtime_1.jsx)(ActivitiesTypeSlice_1.default, { useAction: true, type: type, isActive: activeTab === index })) }, index));
70
+ }) }) }));
74
71
  };
75
72
  exports.ActivityView = ActivityView;
76
73
  exports.ActivityView.displayName = "Activities";
@@ -20,6 +20,6 @@ var ItemsContainer = function (props) {
20
20
  function Menu(props) {
21
21
  var theme = (0, ThemeProvider_1.useTheme)();
22
22
  var items = props.items;
23
- return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ display: "grid", gridTemplateColumns: "repeat(4, 1fr)", paddingTop: theme.mixins.customPadding.p8, paddingBottom: theme.mixins.customPadding.p8, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.mixins.customRadius.r16 }, props.sx), children: items === null || items === void 0 ? void 0 : items.map(function (item, index) { return ((0, jsx_runtime_1.jsx)(ItemsContainer, { children: item }, index)); }) }));
23
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ display: "grid", gridTemplateColumns: "repeat(4, 1fr)", paddingTop: theme.mixins.customPadding.p8, paddingBottom: theme.mixins.customPadding.p8, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.mixins.customRadius.r16, border: "1px solid ".concat(theme.palette.border.accent3) }, props.sx), children: items === null || items === void 0 ? void 0 : items.map(function (item, index) { return ((0, jsx_runtime_1.jsx)(ItemsContainer, { children: item }, index)); }) }));
24
24
  }
25
25
  exports.default = Menu;
@@ -61,7 +61,7 @@ var AssetView = function (props) {
61
61
  var handleBackInitPasscodeView = function () {
62
62
  router.back();
63
63
  };
64
- return ((0, jsx_runtime_1.jsxs)(ChildPageLayout_1.default, { header: !!isInitPasscode && (0, jsx_runtime_1.jsx)(AssetViewHeader_1.default, {}), children: [!isInitPasscode && !!masterWallet && ((0, jsx_runtime_1.jsx)(ChangePasscodeView_1.default, { isInitPasscode: true, onBack: handleBackInitPasscodeView, idPrefix: idPrefix })), !!isInitPasscode && ((0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, __assign({}, rest, { sx: __assign({ display: "flex", flexDirection: "column", gap: theme.mixins.gaps.g16 }, sx), children: [useBasicAmountGroupInAssetView ? (0, jsx_runtime_1.jsx)(BasicAmountGroup_1.default, {}) : (0, jsx_runtime_1.jsx)(AmountGroupAndChart_1.default, {}), (0, jsx_runtime_1.jsx)(Menu_1.default, { items: [
64
+ return ((0, jsx_runtime_1.jsxs)(ChildPageLayout_1.default, { header: !!isInitPasscode && (0, jsx_runtime_1.jsx)(AssetViewHeader_1.default, {}), children: [!isInitPasscode && !!masterWallet && ((0, jsx_runtime_1.jsx)(ChangePasscodeView_1.default, { isInitPasscode: true, onBack: handleBackInitPasscodeView, idPrefix: idPrefix })), !!isInitPasscode && ((0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, __assign({}, rest, { sx: __assign({ display: "flex", flexDirection: "column", gap: theme.mixins.gaps.g16 }, sx), children: [(0, jsx_runtime_1.jsx)(ScanQRToSend_1.default, { children: "dfdf" }), useBasicAmountGroupInAssetView ? (0, jsx_runtime_1.jsx)(BasicAmountGroup_1.default, {}) : (0, jsx_runtime_1.jsx)(AmountGroupAndChart_1.default, {}), (0, jsx_runtime_1.jsx)(Menu_1.default, { items: [
65
65
  (0, jsx_runtime_1.jsx)(ReceiveFunction_1.default, { children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { sx: {
66
66
  borderRight: "1px solid ".concat(theme.palette.border.accent3),
67
67
  placeContent: "center",
@@ -95,7 +95,7 @@ var AssetView = function (props) {
95
95
  fontWeight: theme.typography.fontWeight400,
96
96
  color: theme.palette.text.black,
97
97
  cursor: "pointer",
98
- }, children: "View all" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_ARROW_RIGHT", width: 18, height: 18 })] })] }), (0, jsx_runtime_1.jsx)(ScanQRToSend_1.default, { children: "Scan QR Code" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
98
+ }, children: "View all" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_ARROW_RIGHT", width: 18, height: 18 })] })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
99
99
  position: "relative",
100
100
  left: "-".concat(theme.mixins.customPadding.p16),
101
101
  width: "calc(100% + ".concat(theme.mixins.customPadding.p16, " * 2)"),
@@ -144,8 +144,10 @@ var ChangePasscodeView = function (props) {
144
144
  (_a = swiperControlledRef.current) === null || _a === void 0 ? void 0 : _a.slideTo(step);
145
145
  };
146
146
  var handleDone = function () {
147
- gotoStep(initStep.current);
148
147
  props.onBack();
148
+ setTimeout(function () {
149
+ gotoStep(initStep.current);
150
+ }, 500);
149
151
  };
150
152
  var handleBack = function () {
151
153
  switch (currentStep) {
@@ -109,6 +109,7 @@ var ModalLayout_1 = __importDefault(require("../../../ui/ModalLayout"));
109
109
  var SelectNetwork_1 = __importDefault(require("./SelectNetwork"));
110
110
  var ChildPageLayout_1 = __importDefault(require("../../../layouts/ChildPageLayout"));
111
111
  var navigation_1 = require("next/navigation");
112
+ var react_2 = require("motion/react");
112
113
  var validateAddressDebounce = (0, lodash_1.debounce)(function (callback) {
113
114
  callback();
114
115
  }, 500, { leading: true, trailing: true });
@@ -377,6 +378,10 @@ function Form(props) {
377
378
  var handleKeyboardClose = function () {
378
379
  setIsKeyboardOpen(false);
379
380
  };
381
+ var openSelectNetwork = (0, react_1.useCallback)(function () {
382
+ var _a;
383
+ (_a = selectNetworkDrawerRef.current) === null || _a === void 0 ? void 0 : _a.open();
384
+ }, []);
380
385
  var closeSelectNetwork = function () {
381
386
  var _a;
382
387
  (_a = selectNetworkDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
@@ -385,6 +390,11 @@ function Form(props) {
385
390
  setSelectedNetwork(network);
386
391
  closeSelectNetwork();
387
392
  };
393
+ (0, react_1.useEffect)(function () {
394
+ if (allowSelectNetwork && !selectedNetwork) {
395
+ openSelectNetwork();
396
+ }
397
+ }, [allowSelectNetwork, selectedNetwork, openSelectNetwork]);
388
398
  (0, react_1.useEffect)(function () {
389
399
  if (address) {
390
400
  handleChangeRecipientAddress({
@@ -399,77 +409,77 @@ function Form(props) {
399
409
  container: {
400
410
  height: "100%",
401
411
  },
402
- }, 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
403
- ? {
404
- paddingBottom: theme.mixins.customPadding.p8,
405
- }
406
- : {})), 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: {
407
- fontSize: theme.typography.fontSize14,
408
- color: theme.palette.text.black,
409
- fontWeight: theme.typography.fontWeight700,
410
- }, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
411
- paddingX: theme.mixins.customPadding.p16,
412
- }, inputRest: {
413
- placeholder: "Enter recipient address",
414
- value: recipientAddress,
415
- onChange: handleChangeRecipientAddress,
416
- id: "recipient-address-input-id",
417
- }, 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)("label", { htmlFor: "recipient-address-input-id", children: (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, opacity: allowSelectNetwork ? 1 : 0.5, pointerEvents: allowSelectNetwork ? "auto" : "none" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
418
- fontSize: theme.typography.fontSize14,
419
- color: theme.palette.text.black,
420
- fontWeight: theme.typography.fontWeight700,
421
- }, children: "Network" }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: selectNetworkDrawerRef, trigger: (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
422
- paddingLeft: theme.mixins.customPadding.p12,
423
- paddingRight: theme.mixins.customPadding.p16,
412
+ }, 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.jsx)(react_2.AnimatePresence, { 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
413
+ ? {
414
+ paddingBottom: theme.mixins.customPadding.p8,
415
+ }
416
+ : {})), 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: {
417
+ fontSize: theme.typography.fontSize14,
418
+ color: theme.palette.text.black,
419
+ fontWeight: theme.typography.fontWeight700,
420
+ }, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
421
+ paddingX: theme.mixins.customPadding.p16,
424
422
  }, inputRest: {
425
- placeholder: "Select a network",
426
- value: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.name) || "",
423
+ placeholder: "Enter recipient address",
424
+ value: recipientAddress,
427
425
  onChange: handleChangeRecipientAddress,
428
- inputProps: {
429
- readOnly: true,
430
- },
431
- }, leftPart: (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)(Icon_1.default, { iconKey: "IC_NETWORK", src: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.link) || undefined, sx: { width: 24, height: 24 } }) }), rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { display: "block" }, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 10, height: 18, display: "block" }, children: SvgPath_1.ARROW_DOWN }) }) }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "Select network", onClose: closeSelectNetwork, children: (0, jsx_runtime_1.jsx)(SelectNetwork_1.default, { networks: networks, selectedNetwork: selectedNetwork, selectedToken: selectedToken, onChangeNetwork: handleChangeNetwork }) }) })] }), (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: {
432
- fontSize: theme.typography.fontSize14,
433
- color: theme.palette.text.black,
434
- fontWeight: theme.typography.fontWeight700,
435
- }, 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: 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.jsx)(material_1.Box, { component: "span", sx: { pointerEvents: "none" }, children: placeholder })), styles: {
436
- container: {
437
- paddingRight: theme.mixins.customPadding.p4,
438
- paddingLeft: theme.mixins.customPadding.p16,
439
- paddingTop: theme.mixins.customPadding.p4,
440
- paddingBottom: theme.mixins.customPadding.p4,
441
- border: "1px ".concat(theme.palette.border.primary, " solid"),
442
- borderRadius: theme.mixins.customRadius.r8,
443
- },
444
- }, 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: {
445
- background: theme.palette.background.tertiary,
426
+ id: "recipient-address-input-id",
427
+ }, 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)("label", { htmlFor: "recipient-address-input-id", children: (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 }))] }), allowSelectNetwork && ((0, jsx_runtime_1.jsxs)(react_2.motion.div, { initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, transition: { duration: 0.3 }, style: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8, willChange: "height, opacity" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
428
+ fontSize: theme.typography.fontSize14,
429
+ color: theme.palette.text.black,
430
+ fontWeight: theme.typography.fontWeight700,
431
+ }, children: "Network" }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: selectNetworkDrawerRef, trigger: (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
432
+ paddingLeft: theme.mixins.customPadding.p12,
433
+ paddingRight: theme.mixins.customPadding.p16,
434
+ }, inputRest: {
435
+ placeholder: "Select a network",
436
+ value: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.name) || "",
437
+ onChange: handleChangeRecipientAddress,
438
+ inputProps: {
439
+ readOnly: true,
440
+ },
441
+ }, leftPart: (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)(Icon_1.default, { iconKey: "IC_NETWORK", src: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.link) || undefined, sx: { width: 24, height: 24 } }) }), rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { display: "block" }, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 10, height: 18, display: "block" }, children: SvgPath_1.ARROW_DOWN }) }) }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "Select network", onClose: closeSelectNetwork, children: (0, jsx_runtime_1.jsx)(SelectNetwork_1.default, { networks: networks, selectedNetwork: selectedNetwork, selectedToken: selectedToken, onChangeNetwork: handleChangeNetwork }) }) })] })), (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: {
442
+ fontSize: theme.typography.fontSize14,
446
443
  color: theme.palette.text.black,
447
- fontSize: theme.typography.fontSize11,
448
444
  fontWeight: theme.typography.fontWeight700,
449
- borderRadius: theme.mixins.customRadius.r4,
450
- paddingX: theme.mixins.customPadding.p16,
451
- paddingY: theme.mixins.customPadding.p8,
452
- border: "0px solid",
453
- cursor: "pointer",
454
- }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
455
- fontSize: theme.typography.fontSize12,
456
- color: theme.palette.text.primary,
457
- fontWeight: theme.typography.fontWeight500,
458
- }, 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: {
459
- fontSize: theme.typography.fontSize14,
460
- color: theme.palette.text.black,
461
- fontWeight: theme.typography.fontWeight700,
462
- }, children: "Memo" }), (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)(Input_1.default, { inputRest: {
463
- placeholder: "Enter memo if needed",
464
- value: comment,
465
- onChange: handleChangeComment,
466
- } }), !!memoError && (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: memoError })] }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationDescription), children: "Enter memo if your receiving platform requires one to avoid losing your funds." })] }), (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 ||
467
- !selectedNetwork ||
468
- !amount ||
469
- !!recipientAddressError ||
470
- !!amountError ||
471
- !!memoError ||
472
- !isEnoughBalanceToPayFee
473
- ? Button_1.BUTTON_STATUS.DISABLED
474
- : Button_1.BUTTON_STATUS.ENABLED, sx: { width: "100%", marginTop: "auto" }, children: "Continue" })] }) }) }));
445
+ }, 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: 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.jsx)(material_1.Box, { component: "span", sx: { pointerEvents: "none" }, children: placeholder })), styles: {
446
+ container: {
447
+ paddingRight: theme.mixins.customPadding.p4,
448
+ paddingLeft: theme.mixins.customPadding.p16,
449
+ paddingTop: theme.mixins.customPadding.p4,
450
+ paddingBottom: theme.mixins.customPadding.p4,
451
+ border: "1px ".concat(theme.palette.border.primary, " solid"),
452
+ borderRadius: theme.mixins.customRadius.r8,
453
+ },
454
+ }, 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: {
455
+ background: theme.palette.background.tertiary,
456
+ color: theme.palette.text.black,
457
+ fontSize: theme.typography.fontSize11,
458
+ fontWeight: theme.typography.fontWeight700,
459
+ borderRadius: theme.mixins.customRadius.r4,
460
+ paddingX: theme.mixins.customPadding.p16,
461
+ paddingY: theme.mixins.customPadding.p8,
462
+ border: "0px solid",
463
+ cursor: "pointer",
464
+ }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
465
+ fontSize: theme.typography.fontSize12,
466
+ color: theme.palette.text.primary,
467
+ fontWeight: theme.typography.fontWeight500,
468
+ }, 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: {
469
+ fontSize: theme.typography.fontSize14,
470
+ color: theme.palette.text.black,
471
+ fontWeight: theme.typography.fontWeight700,
472
+ }, children: "Memo" }), (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)(Input_1.default, { inputRest: {
473
+ placeholder: "Enter memo if needed",
474
+ value: comment,
475
+ onChange: handleChangeComment,
476
+ } }), !!memoError && (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: memoError })] }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationDescription), children: "Enter memo if your receiving platform requires one to avoid losing your funds." })] }), (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 ||
477
+ !selectedNetwork ||
478
+ !amount ||
479
+ !!recipientAddressError ||
480
+ !!amountError ||
481
+ !!memoError ||
482
+ !isEnoughBalanceToPayFee
483
+ ? Button_1.BUTTON_STATUS.DISABLED
484
+ : Button_1.BUTTON_STATUS.ENABLED, sx: { width: "100%", marginTop: "auto" }, children: "Continue" })] }) }) }) }));
475
485
  }
@@ -114,7 +114,7 @@ function Result(props) {
114
114
  fontSize: "0.875rem",
115
115
  fontWeight: 500,
116
116
  color: "gray.700",
117
- }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: message }), isAligned: true })), dateCreated && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Date time", titleStyle: {
117
+ }, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { textAlign: "right" }), children: message }), isAligned: true })), dateCreated && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Date time", titleStyle: {
118
118
  fontSize: "0.875rem",
119
119
  fontWeight: 500,
120
120
  color: "gray.700",
@@ -1,14 +1,9 @@
1
- export * from "./handlers";
2
1
  export * from "./components/ui/RequireConnect";
3
2
  export * from "./components/ui/GetWalletSeedPhrase";
4
3
  export * from "./components/ui/ReceiveFunction";
5
4
  export * from "./components/ui/LockToken";
6
5
  export * from "./components/views/AssetView";
7
6
  export * from "./hooks/useWallet";
8
- export * from "./components/views/ActivityView";
9
- export * from "./components/ui/SwapToken";
10
- export * from "./components/ui/TransferInternal";
11
- export * from "./components/ui/WithdrawFunction";
12
7
  export * from "./components/ui/ScanQRToSend";
13
8
  export * from "./components/ui/ChangePasscode";
14
9
  export * from "./components/ui/SendExternalToken";
@@ -19,15 +14,3 @@ export type * from "./services/axios/validate-wallet-address-service/type";
19
14
  export * from "./components/index";
20
15
  export * from "./providers/TekWalletProvider";
21
16
  export * from "./components/ui/UpdateLockToken";
22
- export * from "./components/ui/SendExternalTokenWithdrawn";
23
- export * from "./components/ui/TransferConfirmation";
24
- export * from "./components/ui/IncomeWallet";
25
- export * from "./components/ui/IncomeWallet/components/AnalyticGroup";
26
- export * from "./components/ui/IncomeWallet/components/BalanceChart";
27
- export * from "./components/ui/IncomeWallet/components/HistoryItem";
28
- export * from "./components/ui/IncomeWallet/components/FunctionItem";
29
- export * from "./components/ui/IncomeWallet/components/WealthDeposit";
30
- export * from "./components/ui/IncomeWallet/components/WealthWithdraw";
31
- export * from "./components/ui/IncomeWallet/components/deposit";
32
- export * from "./components/ui/IncomeWallet/components/history";
33
- export * from "./components/ui/AmountGroupAndChart";
@@ -14,17 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./handlers"), exports);
18
17
  __exportStar(require("./components/ui/RequireConnect"), exports);
19
18
  __exportStar(require("./components/ui/GetWalletSeedPhrase"), exports);
20
19
  __exportStar(require("./components/ui/ReceiveFunction"), exports);
21
20
  __exportStar(require("./components/ui/LockToken"), exports);
22
21
  __exportStar(require("./components/views/AssetView"), exports);
23
22
  __exportStar(require("./hooks/useWallet"), exports);
24
- __exportStar(require("./components/views/ActivityView"), exports);
25
- __exportStar(require("./components/ui/SwapToken"), exports);
26
- __exportStar(require("./components/ui/TransferInternal"), exports);
27
- __exportStar(require("./components/ui/WithdrawFunction"), exports);
28
23
  __exportStar(require("./components/ui/ScanQRToSend"), exports);
29
24
  __exportStar(require("./components/ui/ChangePasscode"), exports);
30
25
  __exportStar(require("./components/ui/SendExternalToken"), exports);
@@ -34,15 +29,15 @@ __exportStar(require("./services/axios/validate-wallet-address-service"), export
34
29
  __exportStar(require("./components/index"), exports);
35
30
  __exportStar(require("./providers/TekWalletProvider"), exports);
36
31
  __exportStar(require("./components/ui/UpdateLockToken"), exports);
37
- __exportStar(require("./components/ui/SendExternalTokenWithdrawn"), exports);
38
- __exportStar(require("./components/ui/TransferConfirmation"), exports);
39
- __exportStar(require("./components/ui/IncomeWallet"), exports);
40
- __exportStar(require("./components/ui/IncomeWallet/components/AnalyticGroup"), exports);
41
- __exportStar(require("./components/ui/IncomeWallet/components/BalanceChart"), exports);
42
- __exportStar(require("./components/ui/IncomeWallet/components/HistoryItem"), exports);
43
- __exportStar(require("./components/ui/IncomeWallet/components/FunctionItem"), exports);
44
- __exportStar(require("./components/ui/IncomeWallet/components/WealthDeposit"), exports);
45
- __exportStar(require("./components/ui/IncomeWallet/components/WealthWithdraw"), exports);
46
- __exportStar(require("./components/ui/IncomeWallet/components/deposit"), exports);
47
- __exportStar(require("./components/ui/IncomeWallet/components/history"), exports);
48
- __exportStar(require("./components/ui/AmountGroupAndChart"), exports);
32
+ // export * from "./components/ui/SendExternalTokenWithdrawn";
33
+ // export * from "./components/ui/TransferConfirmation";
34
+ // export * from "./components/ui/IncomeWallet";
35
+ // export * from "./components/ui/IncomeWallet/components/AnalyticGroup";
36
+ // export * from "./components/ui/IncomeWallet/components/BalanceChart";
37
+ // export * from "./components/ui/IncomeWallet/components/HistoryItem";
38
+ // export * from "./components/ui/IncomeWallet/components/FunctionItem";
39
+ // export * from "./components/ui/IncomeWallet/components/WealthDeposit";
40
+ // export * from "./components/ui/IncomeWallet/components/WealthWithdraw";
41
+ // export * from "./components/ui/IncomeWallet/components/deposit";
42
+ // export * from "./components/ui/IncomeWallet/components/history";
43
+ // export * from "./components/ui/AmountGroupAndChart";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.783",
3
+ "version": "0.0.784",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -43,6 +43,7 @@
43
43
  "jsonwebtoken": "^9.0.2",
44
44
  "lodash": "^4.17.21",
45
45
  "lottie-react": "^2.4.1",
46
+ "motion": "^12.23.22",
46
47
  "next": "^15.2.4",
47
48
  "notistack": "^3.0.2",
48
49
  "qrcode.react": "^4.2.0",