tek-wallet 0.0.170 → 0.0.172

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.
@@ -102,6 +102,10 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
102
102
  var handleCleardata = function () {
103
103
  setOtp("");
104
104
  };
105
+ var handleClose = function () {
106
+ var _a;
107
+ (_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
108
+ };
105
109
  (0, react_1.useImperativeHandle)(ref, function () { return ({
106
110
  clearData: handleCleardata,
107
111
  open: function () {
@@ -109,8 +113,7 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
109
113
  (_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.open();
110
114
  },
111
115
  close: function () {
112
- var _a;
113
- (_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
116
+ handleClose();
114
117
  },
115
118
  lockStatus: function () {
116
119
  var _a;
@@ -123,8 +126,8 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
123
126
  }); });
124
127
  var handleOnClose = function () {
125
128
  var _a;
126
- (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
127
129
  handleCleardata();
130
+ (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
128
131
  };
129
132
  var handleOnOpen = function () {
130
133
  var _a;
@@ -132,33 +135,33 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
132
135
  };
133
136
  var handleOtpChange = function (value) { return __awaiter(void 0, void 0, void 0, function () {
134
137
  var err_1;
135
- var _a, _b, _c, _d, _e;
136
- return __generator(this, function (_f) {
137
- switch (_f.label) {
138
+ var _a, _b, _c, _d;
139
+ return __generator(this, function (_e) {
140
+ switch (_e.label) {
138
141
  case 0:
139
- _f.trys.push([0, 3, , 4]);
142
+ _e.trys.push([0, 3, , 4]);
140
143
  setOtp(value);
141
144
  if (!(value.length === passcodeLength)) return [3 /*break*/, 2];
142
145
  (_a = loadingRef.current) === null || _a === void 0 ? void 0 : _a.startLoading();
143
146
  (_b = drawerRef.current) === null || _b === void 0 ? void 0 : _b.lockStatus();
144
147
  return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 5000); })];
145
148
  case 1:
146
- _f.sent();
149
+ _e.sent();
147
150
  (_c = drawerRef.current) === null || _c === void 0 ? void 0 : _c.unlockStatus();
148
151
  (_d = loadingRef.current) === null || _d === void 0 ? void 0 : _d.endLoading();
149
- (_e = drawerRef.current) === null || _e === void 0 ? void 0 : _e.close();
152
+ handleClose();
150
153
  onConfirmSuccess === null || onConfirmSuccess === void 0 ? void 0 : onConfirmSuccess(value);
151
- _f.label = 2;
154
+ _e.label = 2;
152
155
  case 2: return [3 /*break*/, 4];
153
156
  case 3:
154
- err_1 = _f.sent();
157
+ err_1 = _e.sent();
155
158
  console.error(err_1);
156
159
  return [3 /*break*/, 4];
157
160
  case 4: return [2 /*return*/];
158
161
  }
159
162
  });
160
163
  }); };
161
- return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: handleOnOpen, onClose: handleOnClose, children: (0, jsx_runtime_1.jsx)(LoadingLayout_1.default, { initLoading: false, ref: loadingRef, sx: { width: "100%" }, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "Authentication", onClose: props.onClose, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { justifyContent: "center", alignItems: "center", gap: "1rem", width: "100%" }), children: [(0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: ["Enter your passcode to confirm", " ", (0, jsx_runtime_1.jsx)(Text_1.default, { sx: { fontWeight: theme.typography.fontWeight600 }, children: action })] }), (0, jsx_runtime_1.jsx)(OTP_1.default, { value: otp, onChange: handleOtpChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD })] }) }) }) }));
164
+ return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: handleOnOpen, onClose: handleOnClose, children: (0, jsx_runtime_1.jsx)(LoadingLayout_1.default, { initLoading: false, ref: loadingRef, sx: { width: "100%" }, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "Authentication", onClose: handleClose, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { justifyContent: "center", alignItems: "center", gap: "1rem", width: "100%" }), children: [(0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: ["Enter your passcode to confirm", " ", (0, jsx_runtime_1.jsx)(Text_1.default, { sx: { fontWeight: theme.typography.fontWeight600 }, children: action })] }), (0, jsx_runtime_1.jsx)(OTP_1.default, { value: otp, onChange: handleOtpChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD })] }) }) }) }));
162
165
  });
163
166
  ConfirmByPasscode.displayName = "ConfirmByPasscode";
164
167
  exports.default = ConfirmByPasscode;
@@ -21,7 +21,7 @@ var material_1 = require("@mui/material");
21
21
  var getImage_1 = __importDefault(require("../../../utils/getImage"));
22
22
  var ModalLayout = function (props) {
23
23
  var theme = (0, material_1.useTheme)();
24
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({ borderTop: "2px ".concat(theme.palette.secondary.main, " solid"), borderRadius: "1.5rem 1.5rem 0 0", maxHeight: "100dvh", backgroundImage: "url(".concat((0, getImage_1.default)("modal-bg", "jpg"), ")"), backgroundSize: "cover", backgroundPosition: "top", backgroundRepeat: "no-repeat", display: "flex", flexDirection: "column" }, theme.mixins.pagePadding), { paddingTop: theme.mixins.customPadding.p24 }), props.sx), children: [!props.hideHeader && !props.overrideHeader && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
24
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ borderTop: "2px ".concat(theme.palette.secondary.main, " solid"), borderRadius: "1.5rem 1.5rem 0 0", maxHeight: "100dvh", backgroundImage: "url(".concat((0, getImage_1.default)("modal-bg", "jpg"), ")"), backgroundSize: "cover", backgroundPosition: "top", backgroundRepeat: "no-repeat", display: "flex", flexDirection: "column" }, theme.mixins.pagePadding), props.sx), children: [!props.hideHeader && !props.overrideHeader && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
25
25
  width: "100%",
26
26
  position: "relative",
27
27
  }, children: [(0, jsx_runtime_1.jsx)(ModalTitle_1.default, { children: props.title }), (0, jsx_runtime_1.jsx)(CloseModal_1.default, { sx: {
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
14
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
15
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -45,7 +56,7 @@ var getConfigTokenList = function (query) { return __awaiter(void 0, void 0, voi
45
56
  return __generator(this, function (_a) {
46
57
  switch (_a.label) {
47
58
  case 0: return [4 /*yield*/, userClientRequest_1.default.get("/platform-config/list-tokens", {
48
- params: query,
59
+ params: __assign(__assign({}, query), { transaction_type: query === null || query === void 0 ? void 0 : query.transactionType }),
49
60
  })];
50
61
  case 1:
51
62
  response = _a.sent();
@@ -70,3 +70,4 @@
70
70
  // return axiosInstance;
71
71
  // };
72
72
  // export default assignGeneralInterceptor;
73
+ //
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.170",
3
+ "version": "0.0.172",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",