tek-wallet 0.0.115 → 0.0.117

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.
@@ -18,7 +18,6 @@ var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var react_1 = require("react");
19
19
  var StatusDisplay_1 = require("../../../components/ui/StatusDisplay");
20
20
  var StatusDisplay_2 = __importDefault(require("../../../components/ui/StatusDisplay"));
21
- var theme_1 = __importDefault(require("../../../theme/mui/theme"));
22
21
  var material_1 = require("@mui/material");
23
22
  var getImage_1 = __importDefault(require("../../../utils/getImage"));
24
23
  var ChildPageLayout = (0, react_1.forwardRef)(function (props, ref) {
@@ -69,7 +68,7 @@ var ChildPageLayout = (0, react_1.forwardRef)(function (props, ref) {
69
68
  display: "flex",
70
69
  alignItems: "center",
71
70
  justifyContent: "center",
72
- backgroundColor: "".concat(theme_1.default.palette.backgroundBlack24.main),
71
+ backgroundColor: "blackBackground.24",
73
72
  zIndex: 50,
74
73
  }, children: (0, jsx_runtime_1.jsx)(StatusDisplay_2.default, { status: status }) }))] }));
75
74
  });
@@ -19,7 +19,6 @@ var react_1 = require("react");
19
19
  var StatusDisplay_1 = require("../../../components/ui/StatusDisplay");
20
20
  var StatusDisplay_2 = __importDefault(require("../../../components/ui/StatusDisplay"));
21
21
  var system_1 = require("@mui/system");
22
- var theme_1 = __importDefault(require("../../../theme/mui/theme"));
23
22
  var StyledPageLayout = (0, system_1.styled)("div")(function () { return ({
24
23
  height: "100%",
25
24
  width: "100%",
@@ -54,7 +53,7 @@ var StyledStatusOverlay = (0, system_1.styled)("div")(function () { return ({
54
53
  display: "flex",
55
54
  alignItems: "center",
56
55
  justifyContent: "center",
57
- backgroundColor: "".concat(theme_1.default.palette.textWhite.main),
56
+ backgroundColor: "whiteText.main",
58
57
  zIndex: 50,
59
58
  }); });
60
59
  var PageLayout = (0, react_1.forwardRef)(function (props, ref) {
@@ -26,11 +26,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
28
  var jsx_runtime_1 = require("react/jsx-runtime");
29
- var cn_1 = __importDefault(require("../../../utils/cn"));
30
29
  var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
31
30
  var Icon_1 = __importDefault(require("../Icon"));
32
31
  var BackArrow = function (props) {
33
- var className = props.className, rest = __rest(props, ["className"]);
34
- return ((0, jsx_runtime_1.jsx)(Icon_1.default, __assign({ src: (0, getIcon_1.default)("arrow_back"), className: (0, cn_1.default)("size-6", className) }, rest)));
32
+ var rest = __rest(props, []);
33
+ return ((0, jsx_runtime_1.jsx)(Icon_1.default, __assign({ src: (0, getIcon_1.default)("arrow_back"), sx: __assign({ width: "1.5rem", height: "1.5rem" }, props.sx) }, rest)));
35
34
  };
36
35
  exports.default = BackArrow;
@@ -1,17 +1,28 @@
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
  };
6
17
  Object.defineProperty(exports, "__esModule", { value: true });
7
18
  var jsx_runtime_1 = require("react/jsx-runtime");
8
- var cn_1 = __importDefault(require("../../../utils/cn"));
9
19
  var BackArrow_1 = __importDefault(require("../BackArrow"));
10
20
  var useCustomRouter_1 = __importDefault(require("../../../hooks/useCustomRouter"));
11
21
  var Text_1 = __importDefault(require("../Text"));
22
+ var material_1 = require("@mui/material");
12
23
  var BackHeader = function (props) {
13
24
  var router = (0, useCustomRouter_1.default)();
14
- var center = props.center, children = props.children, className = props.className, hideBack = props.hideBack;
25
+ var center = props.center, children = props.children, hideBack = props.hideBack;
15
26
  var back = function (e) {
16
27
  if (props.overrideBack) {
17
28
  props.overrideBack(e);
@@ -19,6 +30,16 @@ var BackHeader = function (props) {
19
30
  }
20
31
  router.back();
21
32
  };
22
- return ((0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.default)("flex items-center gap-3 px-ui-horizontal-3 h-full bg-ui-bg-white relative", className), children: [!hideBack && ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", onClick: back, children: [(0, jsx_runtime_1.jsx)(BackArrow_1.default, {}), " ", (0, jsx_runtime_1.jsx)(Text_1.default, { className: "text-12 text-ui-text-white", children: "Back" })] })), !!center && ((0, jsx_runtime_1.jsx)("div", { className: "absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2", children: center })), children] }));
33
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ display: "flex", alignItems: "center", gap: "1rem", height: "100%", backgroundColor: "ui.bg.white" }, props.sx), children: [!hideBack && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
34
+ display: "flex",
35
+ alignItems: "center",
36
+ gap: "0.5rem",
37
+ cursor: "pointer",
38
+ }, onClick: back, children: [(0, jsx_runtime_1.jsx)(BackArrow_1.default, {}), " ", (0, jsx_runtime_1.jsx)(Text_1.default, { sx: { color: "whiteText.main" }, children: "Back" })] })), !!center && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
39
+ position: "absolute",
40
+ left: "50%",
41
+ top: "50%",
42
+ transform: "translate(-50%, -50%)",
43
+ }, children: center })), children] }));
23
44
  };
24
45
  exports.default = BackHeader;
@@ -118,12 +118,14 @@ var GetSeedPhraseWalletView = function (props) {
118
118
  }, 1500);
119
119
  };
120
120
  var handleOtpChange = function (value) {
121
+ var _a;
121
122
  setOtp(value);
122
123
  /**
123
124
  * validate otp here
124
125
  */
125
126
  if (value.length === passcodeLength) {
126
- var response = getSeedPhrase({
127
+ (_a = childPageLayoutRef.current) === null || _a === void 0 ? void 0 : _a.showLoading();
128
+ getSeedPhrase({
127
129
  passcode: value,
128
130
  }, function () {
129
131
  var _a;
@@ -139,7 +141,6 @@ var GetSeedPhraseWalletView = function (props) {
139
141
  gotoStep(GetSeedPhraseWalletViewStep.SHOW_SEED_PHRASE);
140
142
  }, 1000);
141
143
  }, handleCreateWalletError);
142
- console.warn("🚀 ~ handleOtpChange ~ response:", response);
143
144
  }
144
145
  };
145
146
  return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { ref: childPageLayoutRef, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { overrideBack: handleBack, title: "Backup Wallet" }), children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: __assign({ display: "flex", flexDirection: "column", gap: "1rem", height: "100%" }, props.sx), children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperControlledRef, disableSwipe: true, sx: { height: "100%" }, children: [(0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
@@ -178,13 +179,15 @@ var GetSeedPhraseWalletView = function (props) {
178
179
  textAlign: "center",
179
180
  width: "100%",
180
181
  border: "1px solid rgba(255, 255, 255, 0.2)",
181
- }, children: [index + 1, ". ", isShowSeedPhrase ? word : "********"] }, index)); }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { marginTop: "auto" }, children: "Please do not store your seed phrase digitally (e.g., text files on your computer, email...). Write it down and keep it in a secure, confidential location that is resistant to adverse conditions like moisture, fire, or other hazards for safe storage." }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
182
+ }, children: [index + 1, ". ", isShowSeedPhrase ? word : "********"] }, index)); }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: { marginTop: "auto" }, children: "Please do not store your seed phrase digitally (e.g., text files on your computer, email...). Write it down and keep it in a secure, confidential location that is resistant to adverse conditions like moisture, fire, or other hazards for safe storage." }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
182
183
  display: "flex",
183
- alignItems: "center",
184
+ alignItems: "stretch",
184
185
  gap: "1rem",
185
186
  height: "fit-content",
186
187
  width: "100%",
187
- }, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)(isShowSeedPhrase ? "show_seed_phrase" : "hide_seed_phrase", "svg"), onClick: toggleShowSeedPhrase }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: handleDone, sx: {
188
+ }, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)(isShowSeedPhrase ? "show_seed_phrase" : "hide_seed_phrase", "svg"), onClick: toggleShowSeedPhrase, sx: {
189
+ aspectRatio: 1,
190
+ } }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: handleDone, sx: {
188
191
  flex: 1,
189
192
  }, children: "Done" })] })] }) })] }) }) }));
190
193
  };
@@ -9,11 +9,25 @@ var theme = (0, styles_1.createTheme)({
9
9
  secondary: {
10
10
  main: "#01FF00",
11
11
  },
12
- textWhite: {
12
+ whiteBackground: {
13
13
  main: "#ffffff",
14
+ 16: "rgba(255, 255, 255, 0.16)",
15
+ 24: "rgba(255, 255, 255, 0.24)",
14
16
  },
15
- backgroundBlack24: {
16
- main: "rgba(0, 0, 0, 0.24)",
17
+ whiteText: {
18
+ main: "#ffffff",
19
+ 16: "rgba(255, 255, 255, 0.16)",
20
+ 24: "rgba(255, 255, 255, 0.24)",
21
+ },
22
+ whiteBorder: {
23
+ main: "#ffffff",
24
+ 16: "rgba(255, 255, 255, 0.16)",
25
+ 24: "rgba(255, 255, 255, 0.24)",
26
+ },
27
+ blackBackground: {
28
+ main: "#000000",
29
+ 16: "rgba(0, 0, 0, 0.16)",
30
+ 24: "rgba(0, 0, 0, 0.24)",
17
31
  },
18
32
  },
19
33
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.115",
3
+ "version": "0.0.117",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",