tek-wallet 0.0.567 → 0.0.568

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.
@@ -205,9 +205,9 @@ function ActivitiesProvider(_a) {
205
205
  }); }, [isAuthenticated]);
206
206
  var loadActivities = (0, react_1.useCallback)(function (slug) { return __awaiter(_this, void 0, void 0, function () {
207
207
  var page, response, activitiesLoaded, exceptedActivities, newActivities, newPage;
208
- var _a, _b, _c, _d, _e;
209
- return __generator(this, function (_f) {
210
- switch (_f.label) {
208
+ var _a, _b, _c, _d;
209
+ return __generator(this, function (_e) {
210
+ switch (_e.label) {
211
211
  case 0:
212
212
  if (!isAuthenticated)
213
213
  return [2 /*return*/];
@@ -228,11 +228,12 @@ function ActivitiesProvider(_a) {
228
228
  transaction_types: slug,
229
229
  })];
230
230
  case 1:
231
- response = _f.sent();
231
+ response = _e.sent();
232
232
  activitiesLoaded = (_c = (_b = response === null || response === void 0 ? void 0 : response.data) === null || _b === void 0 ? void 0 : _b.transactions) !== null && _c !== void 0 ? _c : [];
233
- exceptedActivities = (_e = (_d = activities === null || activities === void 0 ? void 0 : activities[slug]) === null || _d === void 0 ? void 0 : _d.filter(function (activity) {
234
- return !activitiesLoaded.some(function (loadedActivity) { return loadedActivity.id === activity.id; });
235
- })) !== null && _e !== void 0 ? _e : [];
233
+ exceptedActivities = (_d = activitiesLoaded === null || activitiesLoaded === void 0 ? void 0 : activitiesLoaded.filter(function (loadedActivity) {
234
+ var _a;
235
+ return !((_a = activities === null || activities === void 0 ? void 0 : activities[slug]) === null || _a === void 0 ? void 0 : _a.some(function (activity) { return loadedActivity.id === activity.id; }));
236
+ })) !== null && _d !== void 0 ? _d : [];
236
237
  newActivities = __spreadArray(__spreadArray([], (exceptedActivities !== null && exceptedActivities !== void 0 ? exceptedActivities : []), true), exceptedActivities, true);
237
238
  newPage = Math.floor(newActivities.length / const_1.ACTIVITIES_PAGE_SIZE);
238
239
  setActivities(function (prev) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.567",
3
+ "version": "0.0.568",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",