wallaby-cash 1.7.16 → 1.7.18

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.
package/dist/index.cjs.js CHANGED
@@ -4815,9 +4815,10 @@ var Base = /** @class */ (function () {
4815
4815
  'x-client-jwt': this.clientAuthToken,
4816
4816
  };
4817
4817
  if (requiresAccessToken && this.userId) {
4818
- if (!isTest && (!accessToken || jwtHasExpired(accessToken))) {
4819
- throw new Error('Access token has expired, please sign in to continue.');
4820
- }
4818
+ // TODO: Add this validation back.
4819
+ // if (!isTest && (!accessToken || jwtHasExpired(accessToken))) {
4820
+ // throw new Error('Access token has expired, please sign in to continue.');
4821
+ // }
4821
4822
  headers = __assign(__assign({}, headers), { Authorization: 'Bearer ' + accessToken });
4822
4823
  }
4823
4824
  return [2 /*return*/, headers];
@@ -6448,10 +6449,7 @@ var MerchantsRoutes = {
6448
6449
  requiresAccessToken: false,
6449
6450
  },
6450
6451
  getAssets: {
6451
- fullPath: function (_a) {
6452
- var merchantId = _a.merchantId;
6453
- return "/merchants/".concat(merchantId, "/assets");
6454
- },
6452
+ fullPath: function () { return "/users/merchants/assets"; },
6455
6453
  method: exports.RequestMethod.Get,
6456
6454
  requiresAccessToken: true,
6457
6455
  },
@@ -6626,29 +6624,25 @@ var Merchants = /** @class */ (function (_super) {
6626
6624
  */
6627
6625
  Merchants.prototype.getAssets = function () {
6628
6626
  return __awaiter(this, void 0, void 0, function () {
6629
- var merchantId, response, error_5;
6627
+ var response, error_5;
6630
6628
  return __generator(this, function (_a) {
6631
6629
  switch (_a.label) {
6632
6630
  case 0:
6633
- _a.trys.push([0, 3, , 4]);
6634
- return [4 /*yield*/, this.device];
6635
- case 1:
6636
- merchantId = (_a.sent()).user.merchantId;
6631
+ _a.trys.push([0, 2, , 3]);
6637
6632
  return [4 /*yield*/, this.request(MerchantsRoutes.getAssets, {
6638
6633
  method: MerchantsRoutes.getAssets.method,
6639
- payload: { merchantId: merchantId },
6640
6634
  })];
6641
- case 2:
6635
+ case 1:
6642
6636
  response = _a.sent();
6643
6637
  if (!response || response.error) {
6644
6638
  throw new Error(response.error);
6645
6639
  }
6646
6640
  return [2 /*return*/, response];
6647
- case 3:
6641
+ case 2:
6648
6642
  error_5 = _a.sent();
6649
6643
  logger.error('SDK::Merchants::list::error', error_5);
6650
6644
  return [2 /*return*/, Promise.reject(error_5)];
6651
- case 4: return [2 /*return*/];
6645
+ case 3: return [2 /*return*/];
6652
6646
  }
6653
6647
  });
6654
6648
  });