tek-wallet 0.0.287 → 0.0.288

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.
@@ -245,6 +245,10 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
245
245
  })];
246
246
  case 1:
247
247
  validateWalletAddress = _e.sent();
248
+ if (!validateWalletAddress) {
249
+ alert("Unsupported QR");
250
+ return [2 /*return*/];
251
+ }
248
252
  (_d = backDropRef.current) === null || _d === void 0 ? void 0 : _d.close();
249
253
  console.warn("validateWalletAddress", validateWalletAddress);
250
254
  if (!!(validateWalletAddress === null || validateWalletAddress === void 0 ? void 0 : validateWalletAddress.master_wallet_address)) {
@@ -1,3 +1,3 @@
1
1
  import { ValidateWalletAddressBody, ValidateWalletAddressData } from "./type";
2
- declare const validateWalletAddressService: (body: ValidateWalletAddressBody) => Promise<ValidateWalletAddressData>;
2
+ declare const validateWalletAddressService: (body: ValidateWalletAddressBody) => Promise<ValidateWalletAddressData | undefined>;
3
3
  export default validateWalletAddressService;
@@ -41,14 +41,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
42
  var userClientRequest_1 = __importDefault(require("../clients/userClientRequest"));
43
43
  var validateWalletAddressService = function (body) { return __awaiter(void 0, void 0, void 0, function () {
44
- var response;
44
+ var response, error_1;
45
45
  var _a;
46
46
  return __generator(this, function (_b) {
47
47
  switch (_b.label) {
48
- case 0: return [4 /*yield*/, userClientRequest_1.default.get("/crypto/validate-address/".concat(body.network, "?address=").concat(body.address))];
48
+ case 0:
49
+ _b.trys.push([0, 2, , 3]);
50
+ return [4 /*yield*/, userClientRequest_1.default.get("/crypto/validate-address/".concat(body.network, "?address=").concat(body.address))];
49
51
  case 1:
50
52
  response = _b.sent();
51
53
  return [2 /*return*/, (_a = response.data) === null || _a === void 0 ? void 0 : _a.data];
54
+ case 2:
55
+ error_1 = _b.sent();
56
+ console.error(error_1);
57
+ return [2 /*return*/];
58
+ case 3: return [2 /*return*/];
52
59
  }
53
60
  });
54
61
  }); };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.287",
3
+ "version": "0.0.288",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",