@ape.swap/bonds-sdk 1.0.352 → 1.0.353
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.
|
@@ -193,25 +193,16 @@ var YourBonds = function (_a) {
|
|
|
193
193
|
});
|
|
194
194
|
});
|
|
195
195
|
return [4 /*yield*/, fetchUserOwnedBillNftData(ownedBillsData, chainId, bonds)
|
|
196
|
-
//
|
|
197
|
-
// return {
|
|
198
|
-
// index: bonds[index].index,
|
|
199
|
-
// userOwnedBillsNfts: bs.map((b: any) => {
|
|
200
|
-
// const nftData = userBillNftData.find((nftB) => parseInt(nftB.id) === b.id);
|
|
201
|
-
// return {
|
|
202
|
-
// ...b,
|
|
203
|
-
// ...nftData
|
|
204
|
-
// } as UserBillNftData;
|
|
205
|
-
// }),
|
|
206
|
-
// };
|
|
207
|
-
// });
|
|
208
|
-
// Combine userBillNftData with userOwnedBillsData
|
|
196
|
+
// Merge userBillNftData into userOwnedBillsData
|
|
209
197
|
];
|
|
210
198
|
case 2:
|
|
211
199
|
userBillNftData_1 = _a.sent();
|
|
212
|
-
combinedData =
|
|
213
|
-
var
|
|
214
|
-
|
|
200
|
+
combinedData = userOwnedBillsData_1.map(function (data) {
|
|
201
|
+
var enrichedUserBills = data.userOwnedBills.map(function (bill) {
|
|
202
|
+
var nftData = userBillNftData_1.find(function (nft) { return nft.id === parseInt(bill.id); });
|
|
203
|
+
return __assign(__assign({}, bill), (nftData ? { image: nftData.data.image, attributes: nftData.data.attributes } : {}));
|
|
204
|
+
});
|
|
205
|
+
return __assign(__assign({}, data), { userOwnedBills: enrichedUserBills });
|
|
215
206
|
});
|
|
216
207
|
console.log("userBillNftData");
|
|
217
208
|
console.log(userBillNftData_1);
|