@ape.swap/bonds-sdk 1.0.342 → 1.0.343

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.
@@ -33,7 +33,16 @@ export declare const setBillsList: import("@reduxjs/toolkit").ActionCreatorWithP
33
33
  }, "Bills/setBillsPublicData">, setUserOwnedBillsData: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "Bills/setUserOwnedBillsData">, setUserOwnedBillsNftData: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "Bills/setUserOwnedBillsNftData">;
34
34
  export declare const fetchBondsStats: (tokenPrices: TokenPrices[]) => (dispatch: Dispatch, getState: any) => Promise<void>;
35
35
  export declare const fetchSingleBillPublicData: (chainId: ChainId, tokenPrices: TokenPrices[], bondAddress: string) => (dispatch: Dispatch, getState: any) => Promise<void>;
36
- export declare const fetchUserOwnedBillsDataAsync: (chainId: ChainId, account: string) => (dispatch: Dispatch, getState: any) => Promise<void>;
36
+ export declare const fetchUserOwnedBillsDataAsync: (chainId: ChainId, account: string) => (dispatch: Dispatch, getState: any) => Promise<{
37
+ userOwnedBillsData: {
38
+ index: number;
39
+ userOwnedBills: import("../../types/bonds").UserBill[];
40
+ }[];
41
+ ownedBillsWithNftData: {
42
+ index: number;
43
+ userOwnedBillsNfts: any[];
44
+ }[];
45
+ }>;
37
46
  declare const _default: import("redux").Reducer<BillsState, import("redux").UnknownAction, BillsState>;
38
47
  export default _default;
39
48
  export declare const parseBondApiData: (billApiData: BondsDataResponse) => CleanedBondsState;
@@ -249,11 +249,12 @@ export var fetchUserOwnedBillsDataAsync = function (chainId, account) {
249
249
  };
250
250
  });
251
251
  dispatch(setUserOwnedBillsNftData({ value: ownedBillsWithNftData }));
252
- return [3 /*break*/, 4];
252
+ // Return the data
253
+ return [2 /*return*/, { userOwnedBillsData: userOwnedBillsData, ownedBillsWithNftData: ownedBillsWithNftData }];
253
254
  case 3:
254
255
  error_3 = _a.sent();
255
256
  console.warn(error_3);
256
- return [3 /*break*/, 4];
257
+ return [2 /*return*/, { userOwnedBillsData: [], ownedBillsWithNftData: [] }];
257
258
  case 4: return [2 /*return*/];
258
259
  }
259
260
  });
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "1.0.342",
6
+ "version": "1.0.343",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",