tek-wallet 0.0.696 → 0.0.698

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,6 +18,7 @@ var STYLES = {
18
18
  nodeSize: "10%",
19
19
  };
20
20
  var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
21
+ var sx = props.sx, className = props.className;
21
22
  var qrReaderContainer = (0, react_1.useRef)(null);
22
23
  var drawerRef = (0, react_1.useRef)(null);
23
24
  var _a = (0, react_1.useState)(false), isOpen = _a[0], setIsOpen = _a[1];
@@ -76,15 +77,30 @@ var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
76
77
  };
77
78
  }
78
79
  }, [isOpen]);
79
- (0, react_1.useLayoutEffect)(function () {
80
- var styleTag = document.createElement("style");
81
- styleTag.innerHTML = "\n @keyframes move-up-down {\n 0% {\n top: 0%;\n } \n 50% {\n top: 100%;\n }\n 100% {\n top: 0%;\n }\n }\n\n .move-up-down-animation {\n animation: move-up-down 5s infinite linear;\n }\n ";
82
- document.head.appendChild(styleTag);
83
- return function () {
84
- styleTag.remove();
85
- };
86
- }, []);
87
- return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { trigger: props.children, ref: drawerRef, onClose: onClose, onOpen: onOpen, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: {
80
+ // useLayoutEffect(() => {
81
+ // const styleTag = document.createElement("style");
82
+ // styleTag.innerHTML = `
83
+ // @keyframes move-up-down {
84
+ // 0% {
85
+ // top: 0%;
86
+ // }
87
+ // 50% {
88
+ // top: 100%;
89
+ // }
90
+ // 100% {
91
+ // top: 0%;
92
+ // }
93
+ // }
94
+ // .move-up-down-animation {
95
+ // animation: move-up-down 5s infinite linear;
96
+ // }
97
+ // `;
98
+ // document.head.appendChild(styleTag);
99
+ // return () => {
100
+ // styleTag.remove();
101
+ // };
102
+ // }, []);
103
+ return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { trigger: props.children, ref: drawerRef, onClose: onClose, onOpen: onOpen, sx: sx, className: className, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: {
88
104
  backgroundColor: "transparent !important",
89
105
  }, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { hideBack: true, title: "Scan QR code", sx: {
90
106
  position: "absolute",
@@ -67,7 +67,7 @@ var type_1 = require("../../../services/axios/validate-wallet-address-service/ty
67
67
  var navigation_1 = require("next/navigation");
68
68
  var ThemeProvider_1 = require("../../../providers/ThemeProvider");
69
69
  exports.ScanQRToSend = (0, react_1.forwardRef)(function (props, ref) {
70
- var children = props.children, transferInternalPath = props.transferInternalPath, transferExternalPath = props.transferExternalPath, gotoTransferInternalOverride = props.gotoTransferInternalOverride, gotoTransferExternalOverride = props.gotoTransferExternalOverride, className = props.className, sx = props.sx;
70
+ var children = props.children, transferInternalPath = props.transferInternalPath, transferExternalPath = props.transferExternalPath, gotoTransferInternalOverride = props.gotoTransferInternalOverride, gotoTransferExternalOverride = props.gotoTransferExternalOverride, sx = props.sx, className = props.className;
71
71
  var internalPath = transferInternalPath || "/transfer-internal";
72
72
  var externalPath = transferExternalPath || "/transfer-external";
73
73
  var drawerRef = (0, react_1.useRef)(null);
@@ -93,11 +93,6 @@ exports.ScanQRToSend = (0, react_1.forwardRef)(function (props, ref) {
93
93
  var handleClearInfoDialogContent = function () {
94
94
  setInfoDialogContent(undefined);
95
95
  };
96
- //
97
- var openCanner = function () {
98
- var _a;
99
- (_a = scannerAllQrCodeRef.current) === null || _a === void 0 ? void 0 : _a.open();
100
- };
101
96
  var gotoTransferInternal = function (params) {
102
97
  var theParams = params !== null && params !== void 0 ? params : paramsData;
103
98
  if (gotoTransferInternalOverride) {
@@ -177,7 +172,7 @@ exports.ScanQRToSend = (0, react_1.forwardRef)(function (props, ref) {
177
172
  }
178
173
  });
179
174
  }); };
180
- 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)(material_1.Box, { onClick: openCanner, className: className, sx: sx, children: children }), (0, jsx_runtime_1.jsx)(QrCodeReader_1.default, { ref: scannerAllQrCodeRef, onResult: handleScanAllQrCode }), (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: {
175
+ 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, { 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
176
  textAlign: "center",
182
177
  display: "inline-block",
183
178
  width: "100%",
@@ -9,23 +9,13 @@ var jsx_runtime_1 = require("react/jsx-runtime");
9
9
  var react_1 = require("react");
10
10
  var useEventHandler_1 = require("../../hooks/useEventHandler");
11
11
  var useRealtime_1 = __importDefault(require("../../hooks/useRealtime"));
12
- var Activities_1 = __importDefault(require("../../components/ui/Activities"));
13
12
  function EventHandlerProvider(props) {
14
13
  var _a = (0, useEventHandler_1.useEventHandler)(), transactionHandler = _a.transactionHandler, walletInfoHandler = _a.walletInfoHandler;
15
14
  var _b = (0, useRealtime_1.default)(), pushNotification = _b.pushNotification, transaction = _b.transaction, walletHandlerInfo = _b.walletHandlerInfo;
16
- var activitiesRef = (0, react_1.useRef)(null);
17
- var options = props.options;
18
- var hideDefaultActivities = options === null || options === void 0 ? void 0 : options.hideDefaultActivities;
19
- var showActivities = (0, react_1.useCallback)(function () {
20
- var _a;
21
- if (hideDefaultActivities)
22
- return;
23
- (_a = activitiesRef.current) === null || _a === void 0 ? void 0 : _a.openTab(0);
24
- }, [hideDefaultActivities]);
25
15
  (0, react_1.useEffect)(function () {
26
16
  if (!transactionHandler || !transaction)
27
17
  return;
28
- var theMessage = transactionHandler(transaction, showActivities);
18
+ var theMessage = transactionHandler(transaction);
29
19
  if (theMessage) {
30
20
  pushNotification(theMessage);
31
21
  }
@@ -33,6 +23,6 @@ function EventHandlerProvider(props) {
33
23
  (0, react_1.useEffect)(function () {
34
24
  walletInfoHandler === null || walletInfoHandler === void 0 ? void 0 : walletInfoHandler(walletHandlerInfo);
35
25
  }, [walletHandlerInfo]);
36
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [props.children, !hideDefaultActivities && false && (0, jsx_runtime_1.jsx)(Activities_1.default, { ref: activitiesRef })] }));
26
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.children });
37
27
  }
38
28
  exports.default = EventHandlerProvider;
@@ -379,7 +379,7 @@ var theme = {
379
379
  dialogActionsCancel: {
380
380
  fontSize: typography.fontSize14,
381
381
  lineHeight: typography.leading140,
382
- color: text.black64,
382
+ color: text.white64,
383
383
  textAlign: "center",
384
384
  padding: "".concat(customPadding.p8, " ").concat(customPadding.p16),
385
385
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.696",
3
+ "version": "0.0.698",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",