tek-wallet 0.0.760 → 0.0.762

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.js +15 -24
  2. package/dist/components/TekWallet/components/ui/ActivityDetail/index.js +4 -2
  3. package/dist/components/TekWallet/components/ui/ActivityItem/index.js +4 -2
  4. package/dist/components/TekWallet/components/ui/AnalyticGroupCenter/index.js +10 -42
  5. package/dist/components/TekWallet/components/ui/AssetViewHeader/index.js +12 -11
  6. package/dist/components/TekWallet/components/ui/CloseModal/index.js +1 -1
  7. package/dist/components/TekWallet/components/ui/CopyTextComponent/index.d.ts +2 -1
  8. package/dist/components/TekWallet/components/ui/CopyTextComponent/index.js +4 -3
  9. package/dist/components/TekWallet/components/ui/CopyableText/index.js +1 -1
  10. package/dist/components/TekWallet/components/ui/EmptyData/index.js +1 -1
  11. package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareAction.js +2 -2
  12. package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareImage.js +13 -13
  13. package/dist/components/TekWallet/components/ui/FiatDeposit/index.js +11 -5
  14. package/dist/components/TekWallet/components/ui/QRCode/index.js +1 -1
  15. package/dist/components/TekWallet/components/ui/QrCodeReader/index.js +10 -8
  16. package/dist/components/TekWallet/components/ui/QrCodeReader/reader.json +2644 -0
  17. package/dist/components/TekWallet/components/ui/ReceiveFunction/index.js +1 -1
  18. package/dist/components/TekWallet/components/ui/SendExternalToken/index.js +1 -1
  19. package/dist/components/TekWallet/components/ui/SvgPath/index.d.ts +1 -0
  20. package/dist/components/TekWallet/components/ui/SvgPath/index.js +24 -23
  21. package/dist/components/TekWallet/components/ui/WaitingData/index.js +29 -5
  22. package/dist/components/TekWallet/components/views/AssetView/index.js +6 -10
  23. package/dist/components/TekWallet/components/views/DetailActivityView/index.d.ts +8 -0
  24. package/dist/components/TekWallet/components/views/DetailActivityView/index.js +31 -0
  25. package/dist/components/TekWallet/components/views/SendExternalView/components/Summary.js +1 -4
  26. package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.js +1 -1
  27. package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +1 -1
  28. package/dist/components/TekWallet/components/views/SendInternalView/components/Summary.js +1 -4
  29. package/dist/components/TekWallet/components/views/SettingView/index.d.ts +1 -1
  30. package/dist/components/TekWallet/components/views/SettingView/index.js +1 -1
  31. package/dist/components/TekWallet/components/views/TekWalletView/expose.d.ts +0 -1
  32. package/dist/components/TekWallet/components/views/TekWalletView/expose.js +0 -1
  33. package/dist/components/TekWallet/components/views/TekWalletView/index.d.ts +10 -6
  34. package/dist/components/TekWallet/components/views/TekWalletView/index.js +48 -5
  35. package/dist/components/TekWallet/providers/EventHandlerProvider/index.js +26 -2
  36. package/dist/components/TekWallet/providers/RealtimeProvider/index.js +33 -5
  37. package/dist/components/TekWallet/providers/RealtimeProvider/type.d.ts +1 -0
  38. package/dist/components/TekWallet/providers/TekWalletProvider/index.d.ts +3 -1
  39. package/dist/components/TekWallet/providers/WalletDataProvider/index.js +2 -0
  40. package/dist/components/TekWallet/providers/WalletDataProviderNoImport/index.js +2 -0
  41. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/components.js +3 -3
  42. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/palette.js +3 -3
  43. package/dist/components/TekWallet/theme/mui/theme.js +5 -5
  44. package/dist/components/TekWallet/types/expose-type.d.ts +4 -0
  45. package/dist/components/TekWallet/utils/stopPropagation.d.ts +2 -0
  46. package/dist/components/TekWallet/utils/stopPropagation.js +7 -0
  47. package/package.json +2 -1
  48. package/dist/components/TekWallet/components/views/TekWalletView/routes.d.ts +0 -10
  49. package/dist/components/TekWallet/components/views/TekWalletView/routes.js +0 -45
@@ -1,10 +1,14 @@
1
- export interface TekWalletViewProps {
1
+ export declare enum TekWalletViewRoutes {
2
+ SEND_INTERNAL = "/send/internal",
3
+ SEND_EXTERNAL = "/send/external",
4
+ SWAP = "/swap",
5
+ ASSET = "/",
6
+ NOT_FOUND = "/not-found",
7
+ ACTIVITY = "/activity",
8
+ SETTING = "/setting"
2
9
  }
3
- export interface TekWalletViewOptions {
4
- hideActivitySectionInAssetView?: boolean;
5
- useBasicAmountGroupInAssetView?: boolean;
10
+ export interface TekWalletViewProps {
6
11
  }
7
12
  export interface TekWalletViewProps {
8
- options?: TekWalletViewOptions;
9
13
  }
10
- export declare function TekWalletView(props: TekWalletViewProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function TekWalletView(): import("react/jsx-runtime").JSX.Element;
@@ -1,17 +1,60 @@
1
1
  "use strict";
2
2
  "use client";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
3
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.TekWalletViewRoutes = void 0;
4
8
  exports.TekWalletView = TekWalletView;
5
9
  var jsx_runtime_1 = require("react/jsx-runtime");
6
10
  var navigation_1 = require("next/navigation");
7
11
  var react_1 = require("react");
8
- var routes_1 = require("./routes");
9
- function TekWalletView(props) {
10
- var options = props.options;
12
+ var NotFoundView_1 = __importDefault(require("../NotFoundView"));
13
+ var SendInternalView_1 = __importDefault(require("../SendInternalView"));
14
+ var SendExternalView_1 = __importDefault(require("../SendExternalView"));
15
+ var SwapView_1 = __importDefault(require("../SwapView"));
16
+ var AssetView_1 = __importDefault(require("../AssetView"));
17
+ var DetailActivityView_1 = __importDefault(require("../DetailActivityView"));
18
+ var ActivityView_1 = __importDefault(require("../ActivityView"));
19
+ var SettingView_1 = __importDefault(require("../SettingView"));
20
+ var TekWalletViewRoutes;
21
+ (function (TekWalletViewRoutes) {
22
+ TekWalletViewRoutes["SEND_INTERNAL"] = "/send/internal";
23
+ TekWalletViewRoutes["SEND_EXTERNAL"] = "/send/external";
24
+ TekWalletViewRoutes["SWAP"] = "/swap";
25
+ TekWalletViewRoutes["ASSET"] = "/";
26
+ TekWalletViewRoutes["NOT_FOUND"] = "/not-found";
27
+ TekWalletViewRoutes["ACTIVITY"] = "/activity";
28
+ TekWalletViewRoutes["SETTING"] = "/setting";
29
+ })(TekWalletViewRoutes || (exports.TekWalletViewRoutes = TekWalletViewRoutes = {}));
30
+ function TekWalletView() {
31
+ var _a, _b, _c, _d;
11
32
  var pathname = (0, navigation_1.useParams)().pathname;
12
33
  var pathnameArray = (0, react_1.useMemo)(function () { return (typeof pathname === "string" ? [pathname] : pathname); }, [pathname]);
13
34
  var pathnameFull = (0, react_1.useMemo)(function () { return pathnameArray === null || pathnameArray === void 0 ? void 0 : pathnameArray.join("/"); }, [pathnameArray]);
14
35
  console.warn("🚀 ~ TekWalletView ~ pathnameFull:", pathname, pathnameFull);
15
- var View = (0, react_1.useMemo)(function () { return (pathname === undefined ? (0, routes_1.getView)("/") : (0, routes_1.getView)("/".concat(pathnameFull))); }, [pathnameFull, pathname]);
16
- return (0, jsx_runtime_1.jsx)(View, { options: options });
36
+ var path = (0, react_1.useMemo)(function () { return (pathname === undefined ? "/" : "/".concat(pathnameFull)); }, [pathnameFull, pathname]);
37
+ if (path.startsWith(TekWalletViewRoutes.SEND_INTERNAL)) {
38
+ return (0, jsx_runtime_1.jsx)(SendInternalView_1.default, {});
39
+ }
40
+ if (path.startsWith(TekWalletViewRoutes.SEND_EXTERNAL)) {
41
+ return (0, jsx_runtime_1.jsx)(SendExternalView_1.default, {});
42
+ }
43
+ if (path.startsWith(TekWalletViewRoutes.SWAP)) {
44
+ return (0, jsx_runtime_1.jsx)(SwapView_1.default, {});
45
+ }
46
+ if (path === TekWalletViewRoutes.ASSET) {
47
+ return (0, jsx_runtime_1.jsx)(AssetView_1.default, {});
48
+ }
49
+ if (path.startsWith(TekWalletViewRoutes.ACTIVITY) &&
50
+ ((_b = (_a = path === null || path === void 0 ? void 0 : path.split("/")) === null || _a === void 0 ? void 0 : _a.filter(Boolean)) === null || _b === void 0 ? void 0 : _b.length) > 1) {
51
+ return (0, jsx_runtime_1.jsx)(DetailActivityView_1.default, { id: (_d = (_c = path === null || path === void 0 ? void 0 : path.split("/")) === null || _c === void 0 ? void 0 : _c.filter(Boolean)) === null || _d === void 0 ? void 0 : _d[1] });
52
+ }
53
+ if (path.startsWith(TekWalletViewRoutes.ACTIVITY)) {
54
+ return (0, jsx_runtime_1.jsx)(ActivityView_1.default, {});
55
+ }
56
+ if (path.startsWith(TekWalletViewRoutes.SETTING)) {
57
+ return (0, jsx_runtime_1.jsx)(SettingView_1.default, {});
58
+ }
59
+ return (0, jsx_runtime_1.jsx)(NotFoundView_1.default, {});
17
60
  }
@@ -1,5 +1,16 @@
1
1
  "use strict";
2
2
  "use client";
3
+ var __assign = (this && this.__assign) || function () {
4
+ __assign = Object.assign || function(t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8
+ t[p] = s[p];
9
+ }
10
+ return t;
11
+ };
12
+ return __assign.apply(this, arguments);
13
+ };
3
14
  var __importDefault = (this && this.__importDefault) || function (mod) {
4
15
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
16
  };
@@ -9,9 +20,17 @@ var jsx_runtime_1 = require("react/jsx-runtime");
9
20
  var react_1 = require("react");
10
21
  var useEventHandler_1 = require("../../hooks/useEventHandler");
11
22
  var useRealtime_1 = __importDefault(require("../../hooks/useRealtime"));
23
+ var TekWalletProvider_1 = require("../TekWalletProvider");
24
+ var useCustomRouter_1 = __importDefault(require("../../hooks/useCustomRouter"));
25
+ var type_1 = require("../../services/axios/get-activities-service/type");
12
26
  function EventHandlerProvider(props) {
13
27
  var _a = (0, useEventHandler_1.useEventHandler)(), transactionHandler = _a.transactionHandler, walletInfoHandler = _a.walletInfoHandler;
14
28
  var _b = (0, useRealtime_1.default)(), pushNotification = _b.pushNotification, transaction = _b.transaction, walletHandlerInfo = _b.walletHandlerInfo;
29
+ var router = (0, useCustomRouter_1.default)();
30
+ var options = (0, TekWalletProvider_1.useWalletConfig)().options;
31
+ (0, react_1.useEffect)(function () {
32
+ router.prefetch("".concat(options === null || options === void 0 ? void 0 : options.basePath, "/tek-wallet/activities/abc"));
33
+ }, [router, options === null || options === void 0 ? void 0 : options.basePath]);
15
34
  (0, react_1.useEffect)(function () {
16
35
  var _a;
17
36
  if (!transactionHandler || !transaction)
@@ -21,8 +40,13 @@ function EventHandlerProvider(props) {
21
40
  if ((_a = theMessage.id) === null || _a === void 0 ? void 0 : _a.includes("processing")) {
22
41
  return;
23
42
  }
24
- console.warn("🚀 ~ EventHandlerProvider ~ theMessage:", theMessage);
25
- pushNotification(theMessage);
43
+ var onClickNotification = function () {
44
+ if (transaction.status !== type_1.TransactionStatus.Success)
45
+ return;
46
+ router.push("".concat(options === null || options === void 0 ? void 0 : options.basePath, "/tek-wallet/activities/").concat(transaction.id));
47
+ };
48
+ console.warn("🚀 ~ EventHandlerProvider ~ theMessage:", transaction, theMessage);
49
+ pushNotification(__assign(__assign({}, theMessage), { onClick: onClickNotification }));
26
50
  }
27
51
  }, [transaction]);
28
52
  (0, react_1.useEffect)(function () {
@@ -66,6 +66,7 @@ var ably_service_1 = require("../../services/ably/ably.service");
66
66
  var material_1 = require("@mui/material");
67
67
  var notistack_1 = require("notistack");
68
68
  var ThemeProvider_1 = require("../ThemeProvider");
69
+ var CloseModal_1 = __importDefault(require("../../components/ui/CloseModal"));
69
70
  exports.initialRealtime = {
70
71
  transaction: undefined,
71
72
  walletHandlerInfo: undefined,
@@ -128,16 +129,43 @@ function RealtimeProvider(_a) {
128
129
  horizontal: (_e = (_d = notification === null || notification === void 0 ? void 0 : notification.anchorOrigin) === null || _d === void 0 ? void 0 : _d.horizontal) !== null && _e !== void 0 ? _e : "right",
129
130
  }, onClose: function () {
130
131
  closeNotification(notification.id);
131
- }, slots: { transition: GrowTransition }, autoHideDuration: (_f = notification.duration) !== null && _f !== void 0 ? _f : 5000, children: (0, jsx_runtime_1.jsx)(material_1.Alert, { icon: false, severity: notification.type, sx: {
132
- width: "fit-content",
133
- borderRadius: theme.mixins.customRadius.r6,
132
+ }, slots: { transition: GrowTransition }, autoHideDuration: (_f = notification.duration) !== null && _f !== void 0 ? _f : 5000, children: (0, jsx_runtime_1.jsxs)(material_1.Alert, { onClick: notification.onClick, icon: false, severity: notification.type, sx: {
133
+ width: "100%",
134
+ maxWidth: "calc(100vw - 2rem)",
135
+ borderRadius: theme.mixins.customRadius.r12,
134
136
  mx: "auto",
135
137
  padding: "".concat(theme.mixins.customPadding.p0, " ").concat(theme.mixins.customPadding.p12),
136
138
  fontSize: theme.typography.fontSize14,
139
+ position: "relative",
140
+ transform: "translateY(0.5rem) !important",
141
+ backgroundColor: theme.palette.background.white24,
142
+ color: theme.palette.text.black,
143
+ backdropFilter: "blur(24px)",
144
+ border: "1px solid ".concat(theme.palette.border.accent3),
145
+ boxShadow: "1px 1px 10px 1px rgba(0, 0, 0, 0.07)",
137
146
  "& .MuiAlert-message": {
138
- padding: "".concat(theme.mixins.customPadding.p6, " ").concat(theme.mixins.customPadding.p0),
147
+ padding: "".concat(theme.mixins.customPadding.p12, " ").concat(theme.mixins.customPadding.p8),
139
148
  },
140
- }, children: notification.message }) }, notification.id));
149
+ }, children: [notification.message, " ", (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
150
+ color: "inherit",
151
+ position: "absolute",
152
+ right: 0,
153
+ bottom: 0,
154
+ aspectRatio: "1/1",
155
+ boxShadow: "1px 1px 10px 1px rgba(0, 0, 0, 0.07)",
156
+ backgroundColor: theme.palette.background.white,
157
+ border: "1px solid ".concat(theme.palette.border.accent),
158
+ padding: theme.mixins.customPadding.p6,
159
+ borderRadius: "999px",
160
+ transform: "translate(30%, 30%)",
161
+ }, onClick: function (e) {
162
+ e.stopPropagation();
163
+ closeNotification(notification.id);
164
+ }, children: (0, jsx_runtime_1.jsx)(CloseModal_1.default, { sx: {
165
+ width: "0.625rem",
166
+ height: "0.625rem",
167
+ display: "block",
168
+ } }) })] }) }, notification.id));
141
169
  }) }))] }));
142
170
  }
143
171
  exports.default = RealtimeProvider;
@@ -15,4 +15,5 @@ export interface NotificationType {
15
15
  horizontal: "left" | "center" | "right";
16
16
  };
17
17
  open?: boolean;
18
+ onClick?: () => void;
18
19
  }
@@ -1,8 +1,10 @@
1
1
  import { ReactNode } from "react";
2
2
  export interface Options {
3
+ basePath?: string;
3
4
  hideDefaultActivities?: boolean;
4
5
  useDefaultToastMessage?: boolean;
5
- basePath?: string;
6
+ hideActivitySectionInAssetView?: boolean;
7
+ useBasicAmountGroupInAssetView?: boolean;
6
8
  }
7
9
  export interface TekWalletProviderProps {
8
10
  children: ReactNode;
@@ -168,6 +168,8 @@ function WalletDataProvider(props) {
168
168
  setBlockchainWallets(response === null || response === void 0 ? void 0 : response.blockchain_wallets.map(function (item) { return ({
169
169
  blockchainAddress: item.blockchain_address,
170
170
  networkSlug: item.network_slug,
171
+ networkName: item.network_name,
172
+ networkIcon: item.network_icon,
171
173
  }); }));
172
174
  setIsTokensLoading(false);
173
175
  return [3 /*break*/, 3];
@@ -172,6 +172,8 @@ function WalletDataProviderNoImport(_a) {
172
172
  setBlockchainWallets(response === null || response === void 0 ? void 0 : response.blockchain_wallets.map(function (item) { return ({
173
173
  blockchainAddress: item.blockchain_address,
174
174
  networkSlug: item.network_slug,
175
+ networkName: item.network_name,
176
+ networkIcon: item.network_icon,
175
177
  }); }));
176
178
  setPolicyInfo(response === null || response === void 0 ? void 0 : response.policy_info);
177
179
  setIsTokensLoading(false);
@@ -75,14 +75,14 @@ exports.components = {
75
75
  props: { loading: true, color: "primary" },
76
76
  style: function () { return ({
77
77
  background: "linear-gradient(0deg, rgba(30, 72, 65, 0.20) 0%, rgba(30, 72, 65, 0.20) 100%), #FFF !important",
78
- color: "#1C461D80 !important",
78
+ color: "#044C2F80 !important",
79
79
  }); },
80
80
  },
81
81
  {
82
82
  props: { loading: true, color: "secondary" },
83
83
  style: function () { return ({
84
84
  background: "linear-gradient(0deg, rgba(197, 233, 159, 0.20) 0%, rgba(197, 233, 159, 0.20) 100%), #FFF !important",
85
- color: "#1C461D80 !important",
85
+ color: "#044C2F80 !important",
86
86
  }); },
87
87
  },
88
88
  {
@@ -110,7 +110,7 @@ exports.components = {
110
110
  style: function () { return ({
111
111
  color: "transparent !important",
112
112
  "& .MuiCircularProgress-circle": {
113
- stroke: "#1C461D80",
113
+ stroke: "#044C2F80",
114
114
  },
115
115
  }); },
116
116
  },
@@ -4,12 +4,12 @@ exports.palette = void 0;
4
4
  require("@mui/material/styles");
5
5
  exports.palette = {
6
6
  primary: {
7
- main: "#1C461D",
7
+ main: "#044C2F",
8
8
  contrastText: "#BBF49C",
9
9
  },
10
10
  secondary: {
11
11
  main: "#BBF49C",
12
- contrastText: "#1C461D",
12
+ contrastText: "#044C2F",
13
13
  },
14
14
  tertiary: {
15
15
  main: "#ECF4E9",
@@ -19,7 +19,7 @@ exports.palette = {
19
19
  },
20
20
  negative: {
21
21
  main: "#FFFFFF",
22
- contrastText: "#1C461D",
22
+ contrastText: "#044C2F",
23
23
  },
24
24
  accent: {
25
25
  main: "#A3A3A3",
@@ -37,8 +37,8 @@ var background = {
37
37
  black64: "rgba(0, 0, 0, 0.64)",
38
38
  black24: "rgba(0, 0, 0, 0.24)",
39
39
  black16: "rgba(0, 0, 0, 0.16)",
40
- primary: "#1C461D",
41
- primary16: "#1C461D29",
40
+ primary: "#044C2F",
41
+ primary16: "#044C2F29",
42
42
  secondary: "#C5E99F",
43
43
  secondary16: "#C5E99F29",
44
44
  error: "#FF434E",
@@ -50,7 +50,7 @@ var background = {
50
50
  errorStatus: "#FF434E",
51
51
  };
52
52
  var border = {
53
- primary: "#1C461D",
53
+ primary: "#044C2F",
54
54
  white: "#ffffff",
55
55
  white64: "rgba(255, 255, 255, 0.64)",
56
56
  white24: "rgba(255, 255, 255, 0.24)",
@@ -79,7 +79,7 @@ var text = {
79
79
  black64: "rgba(0, 0, 0, 0.64)",
80
80
  black24: "rgba(0, 0, 0, 0.24)",
81
81
  blackContrast: "#121212",
82
- primary: "#1C461D",
82
+ primary: "#044C2F",
83
83
  secondary: "#C5E99F",
84
84
  accent: "#A3A3A3",
85
85
  accent2: "#6B7271",
@@ -185,7 +185,7 @@ var zIndex = {
185
185
  var theme = {
186
186
  palette: {
187
187
  primary: {
188
- main: "#1C461D",
188
+ main: "#044C2F",
189
189
  contrastText: "#000000",
190
190
  },
191
191
  secondary: {
@@ -143,10 +143,14 @@ export interface BlockchainWallet {
143
143
  master_address: string;
144
144
  blockchain_address: string;
145
145
  network_slug: string;
146
+ network_name: string;
147
+ network_icon: string;
146
148
  }
147
149
  export interface BlockchainWalletType {
148
150
  blockchainAddress: string;
149
151
  networkSlug: string;
152
+ networkName: string;
153
+ networkIcon: string;
150
154
  }
151
155
  export interface Balance {
152
156
  id: string;
@@ -0,0 +1,2 @@
1
+ import { ReactEventHandler } from "react";
2
+ export declare const stopPropagation: ReactEventHandler;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stopPropagation = void 0;
4
+ var stopPropagation = function (e) {
5
+ e.stopPropagation();
6
+ };
7
+ exports.stopPropagation = stopPropagation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.760",
3
+ "version": "0.0.762",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -47,6 +47,7 @@
47
47
  "html-to-image": "^1.11.13",
48
48
  "jsonwebtoken": "^9.0.2",
49
49
  "lodash": "^4.17.21",
50
+ "lottie-react": "^2.4.1",
50
51
  "next": "^15.2.4",
51
52
  "notistack": "^3.0.2",
52
53
  "qrcode.react": "^4.2.0",
@@ -1,10 +0,0 @@
1
- export declare enum TekWalletViewRoutes {
2
- SEND_INTERNAL = "/send/internal",
3
- SEND_EXTERNAL = "/send/external",
4
- SWAP = "/swap",
5
- ASSET = "/",
6
- NOT_FOUND = "/not-found",
7
- ACTIVITY = "/activity",
8
- SETTING = "/setting"
9
- }
10
- export declare const getView: (path: string) => any;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getView = exports.TekWalletViewRoutes = void 0;
7
- var ActivityView_1 = __importDefault(require("../ActivityView"));
8
- var AssetView_1 = __importDefault(require("../AssetView"));
9
- var NotFoundView_1 = __importDefault(require("../NotFoundView"));
10
- var SendExternalView_1 = __importDefault(require("../SendExternalView"));
11
- var SendInternalView_1 = require("../SendInternalView");
12
- var SettingView_1 = require("../SettingView");
13
- var SwapView_1 = require("../SwapView");
14
- var TekWalletViewRoutes;
15
- (function (TekWalletViewRoutes) {
16
- TekWalletViewRoutes["SEND_INTERNAL"] = "/send/internal";
17
- TekWalletViewRoutes["SEND_EXTERNAL"] = "/send/external";
18
- TekWalletViewRoutes["SWAP"] = "/swap";
19
- TekWalletViewRoutes["ASSET"] = "/";
20
- TekWalletViewRoutes["NOT_FOUND"] = "/not-found";
21
- TekWalletViewRoutes["ACTIVITY"] = "/activity";
22
- TekWalletViewRoutes["SETTING"] = "/setting";
23
- })(TekWalletViewRoutes || (exports.TekWalletViewRoutes = TekWalletViewRoutes = {}));
24
- var getView = function (path) {
25
- if (path.startsWith(TekWalletViewRoutes.SEND_INTERNAL)) {
26
- return SendInternalView_1.SendInternalView;
27
- }
28
- if (path.startsWith(TekWalletViewRoutes.SEND_EXTERNAL)) {
29
- return SendExternalView_1.default;
30
- }
31
- if (path.startsWith(TekWalletViewRoutes.SWAP)) {
32
- return SwapView_1.SwapView;
33
- }
34
- if (path === TekWalletViewRoutes.ASSET) {
35
- return AssetView_1.default;
36
- }
37
- if (path.startsWith(TekWalletViewRoutes.ACTIVITY)) {
38
- return ActivityView_1.default;
39
- }
40
- if (path.startsWith(TekWalletViewRoutes.SETTING)) {
41
- return SettingView_1.SettingView;
42
- }
43
- return NotFoundView_1.default;
44
- };
45
- exports.getView = getView;