tek-wallet 0.0.183 → 0.0.185

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.
@@ -32,15 +32,14 @@ var DRAWER_DIRECTION;
32
32
  DRAWER_DIRECTION["RIGHT"] = "right";
33
33
  })(DRAWER_DIRECTION || (exports.DRAWER_DIRECTION = DRAWER_DIRECTION = {}));
34
34
  var DrawerComponent = (0, react_1.forwardRef)(function (props, ref) {
35
- var _a;
36
35
  var onOpen = props.onOpen, onClose = props.onClose, onToggle = props.onToggle, sx = props.sx, trigger = props.trigger, direction = props.direction, children = props.children, rest = __rest(props, ["onOpen", "onClose", "onToggle", "sx", "trigger", "direction", "children"]);
37
- var _b = (0, react_1.useState)(false), isShowDrawerComponent = _b[0], setIsShowDrawerComponent = _b[1];
38
- var isOpen = (0, react_1.useRef)(undefined);
36
+ var _a = (0, react_1.useState)(false), isShowDrawerComponent = _a[0], setIsShowDrawerComponent = _a[1];
37
+ var _b = (0, react_1.useState)(undefined), isOpen = _b[0], setIsOpen = _b[1];
39
38
  var lockStatus = function () {
40
- isOpen.current = isShowDrawerComponent;
39
+ setIsOpen(isShowDrawerComponent);
41
40
  };
42
41
  var unlockStatus = function () {
43
- isOpen.current = undefined;
42
+ setIsOpen(undefined);
44
43
  };
45
44
  var handleOpen = function () {
46
45
  unlockStatus();
@@ -64,16 +63,10 @@ var DrawerComponent = (0, react_1.forwardRef)(function (props, ref) {
64
63
  unlockStatus: unlockStatus,
65
64
  }); });
66
65
  var onDrawerClose = function (e) {
67
- if (isOpen.current !== undefined) {
68
- setIsShowDrawerComponent(isOpen.current);
69
- }
70
66
  setIsShowDrawerComponent(false);
71
67
  onClose === null || onClose === void 0 ? void 0 : onClose(e);
72
68
  };
73
69
  var onDrawerOpen = function (e) {
74
- if (isOpen.current !== undefined) {
75
- setIsShowDrawerComponent(isOpen.current);
76
- }
77
70
  setIsShowDrawerComponent(true);
78
71
  onOpen === null || onOpen === void 0 ? void 0 : onOpen(e);
79
72
  };
@@ -83,7 +76,7 @@ var DrawerComponent = (0, react_1.forwardRef)(function (props, ref) {
83
76
  overflow: "hidden",
84
77
  boxShadow: "none",
85
78
  },
86
- }, anchor: direction || "bottom", open: (_a = isOpen.current) !== null && _a !== void 0 ? _a : isShowDrawerComponent, onOpen: onDrawerOpen, onClose: onDrawerClose, disableSwipeToOpen: isOpen.current !== undefined, disableDiscovery: isOpen.current !== undefined, children: children }))] }));
79
+ }, anchor: direction || "bottom", open: isOpen !== null && isOpen !== void 0 ? isOpen : isShowDrawerComponent, onOpen: onDrawerOpen, onClose: onDrawerClose, disableSwipeToOpen: isOpen !== undefined, disableDiscovery: isOpen !== undefined, children: children }))] }));
87
80
  });
88
81
  DrawerComponent.displayName = "DrawerComponent";
89
82
  exports.default = DrawerComponent;
@@ -21,6 +21,7 @@ var material_1 = require("@mui/material");
21
21
  var LineValue = function (props) {
22
22
  var theme = (0, material_1.useTheme)();
23
23
  var field = props.field, value = props.value, valueDescription = props.valueDescription;
24
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { alignItems: "start", gap: theme.mixins.gaps.g16 }), props.sx), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: field }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { alignItems: "end", gap: theme.mixins.gaps.g2 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: value }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: valueDescription })] })] }));
24
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { alignItems: "start", gap: theme.mixins.gaps.g16 }), props.sx), children: [!!field && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: field })), !!value ||
25
+ (!!valueDescription && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { alignItems: "end", gap: theme.mixins.gaps.g2 }), children: [!!value && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: value })), !!valueDescription && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: valueDescription }))] })))] }));
25
26
  };
26
27
  exports.default = LineValue;
@@ -30,7 +30,7 @@ var LoadingLayout = (0, react_1.forwardRef)(function (props, ref) {
30
30
  setLoading(false);
31
31
  },
32
32
  }); });
33
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative", width: "fit-content", height: "fit-content" }, sx), children: [children, loading && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({ position: "absolute", inset: 0 }, theme.mixins.whiteLoadingOverlay), { zIndex: 1000, pointerEvents: "none" }), children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.center), children: loadingMessage }) }))] }));
33
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative", width: "fit-content", height: "fit-content" }, sx), children: [children, loading && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({ position: "absolute", inset: 0 }, theme.mixins.whiteLoadingOverlay), { zIndex: 1000 }), children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.center), children: loadingMessage }) }))] }));
34
34
  });
35
35
  LoadingLayout.displayName = "LoadingLayout";
36
36
  exports.default = LoadingLayout;
@@ -103,7 +103,7 @@ function LockTokensProvider(_a) {
103
103
  return [4 /*yield*/, (0, get_lock_tokens_list_1.default)()];
104
104
  case 1:
105
105
  response = _a.sent();
106
- console.warn("🚀 ~ getBalance ~ response:", response);
106
+ console.warn("🚀 ~ getBalance ~ response: ", response);
107
107
  setLockTokens(response === null || response === void 0 ? void 0 : response.supported_tokens);
108
108
  setIsLoadingLockToken(false);
109
109
  return [3 /*break*/, 3];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.183",
3
+ "version": "0.0.185",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",