tek-wallet 0.0.209 → 0.0.210

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.
@@ -1,7 +1,9 @@
1
1
  import { ConfirmLayoutProps } from "../ConfirmLayout";
2
2
  import { LockData } from "./type";
3
+ import { LockTokenResponse } from "../../../services/axios/lock-token-service/type";
3
4
  interface LockTokenProps extends Omit<ConfirmLayoutProps, "action"> {
4
5
  lockData: LockData;
6
+ onLockSuccess?: (data: LockTokenResponse) => any;
5
7
  }
6
8
  export interface LockTokenRef {
7
9
  open: () => void;
@@ -145,9 +145,9 @@ var LockToken = (0, react_1.forwardRef)(function (props, ref) {
145
145
  }, [lockTokens, (_a = props.lockData) === null || _a === void 0 ? void 0 : _a.amount, (_b = props.lockData) === null || _b === void 0 ? void 0 : _b.tokenSlug]);
146
146
  var handleLockToken = function (passcode) { return __awaiter(void 0, void 0, void 0, function () {
147
147
  var response;
148
- var _a;
149
- return __generator(this, function (_b) {
150
- switch (_b.label) {
148
+ var _a, _b;
149
+ return __generator(this, function (_c) {
150
+ switch (_c.label) {
151
151
  case 0:
152
152
  console.warn("🚀 ~ handleLockToken ~ lockData:", props.lockData, passcode);
153
153
  setButtonStatus(Button_1.BUTTON_STATUS.LOADING);
@@ -161,10 +161,11 @@ var LockToken = (0, react_1.forwardRef)(function (props, ref) {
161
161
  ],
162
162
  })];
163
163
  case 1:
164
- response = _b.sent();
164
+ response = _c.sent();
165
165
  console.warn("🚀 ~ handleLockToken ~ response:", response);
166
166
  if (response.success) {
167
167
  (_a = confirmByPasscodeDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
168
+ (_b = props.onLockSuccess) === null || _b === void 0 ? void 0 : _b.call(props, response);
168
169
  }
169
170
  else {
170
171
  setError(LockTokenError.FAILED);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.209",
3
+ "version": "0.0.210",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",