@ape.swap/bonds-sdk 1.0.351 → 1.0.352
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.
|
@@ -161,16 +161,6 @@ var YourBonds = function (_a) {
|
|
|
161
161
|
setIsModalOpen(true);
|
|
162
162
|
navigate("/YourBonds/?bondAddress=".concat(bond.billAddress, "&bondChain=").concat(bond.chainId), { replace: true });
|
|
163
163
|
};
|
|
164
|
-
// const usePollUserBills = () => {
|
|
165
|
-
// const { slowRefresh } = useRefresh()
|
|
166
|
-
// // const dispatch = useAppDispatch()
|
|
167
|
-
// const { account, isActive } = useWeb3React();
|
|
168
|
-
// useEffect(() => {
|
|
169
|
-
// if (account) {
|
|
170
|
-
// MAINNET_CHAINS.map((chain) => fetchUserOwnedBillsDataAsync(chain as number, account))
|
|
171
|
-
// }
|
|
172
|
-
// }, [account, slowRefresh])
|
|
173
|
-
// }
|
|
174
164
|
var currentTime = useCurrentTime() / 1000;
|
|
175
165
|
var vestingTimeRemaining = function (userBill) {
|
|
176
166
|
return getTimePeriods(parseInt(userBill.lastBlockTimestamp) + parseInt(userBill.vesting) - currentTime, true);
|
|
@@ -220,8 +210,8 @@ var YourBonds = function (_a) {
|
|
|
220
210
|
case 2:
|
|
221
211
|
userBillNftData_1 = _a.sent();
|
|
222
212
|
combinedData = ownedBillsData.map(function (ownedBill) {
|
|
223
|
-
var nftData = userBillNftData_1.find(function (nft) { return
|
|
224
|
-
return __assign(__assign({}, ownedBill), { image: nftData === null || nftData === void 0 ? void 0 : nftData.image, attributes: nftData === null || nftData === void 0 ? void 0 : nftData.attributes });
|
|
213
|
+
var nftData = userBillNftData_1.find(function (nft) { return nft.id === parseInt(ownedBill.id); });
|
|
214
|
+
return __assign(__assign({}, ownedBill), { image: nftData === null || nftData === void 0 ? void 0 : nftData.data.image, attributes: nftData === null || nftData === void 0 ? void 0 : nftData.data.attributes });
|
|
225
215
|
});
|
|
226
216
|
console.log("userBillNftData");
|
|
227
217
|
console.log(userBillNftData_1);
|
package/dist/types/bonds.d.ts
CHANGED
|
@@ -47,63 +47,66 @@ export interface UserBillNft {
|
|
|
47
47
|
}[];
|
|
48
48
|
}
|
|
49
49
|
export interface UserBillNftData {
|
|
50
|
-
|
|
51
|
-
description: string;
|
|
52
|
-
tokenId: number;
|
|
53
|
-
image: string;
|
|
54
|
-
attributes: {
|
|
55
|
-
trait_type: string;
|
|
56
|
-
value: string;
|
|
57
|
-
}[];
|
|
50
|
+
id: number;
|
|
58
51
|
data: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
tokenId: number;
|
|
55
|
+
image: string;
|
|
56
|
+
attributes: {
|
|
57
|
+
trait_type: string;
|
|
58
|
+
value: string;
|
|
59
|
+
}[];
|
|
60
|
+
data: {
|
|
61
|
+
billContract: string;
|
|
62
|
+
billNftAddress: string;
|
|
63
|
+
payout: number;
|
|
64
|
+
deposit: number;
|
|
65
|
+
createTransactionHash: string;
|
|
66
|
+
billNftId: number;
|
|
67
|
+
expires: number;
|
|
68
|
+
vestingPeriodSeconds: number;
|
|
69
|
+
payoutToken: string;
|
|
70
|
+
principalToken: string;
|
|
71
|
+
type: string;
|
|
72
|
+
pairName: string;
|
|
73
|
+
payoutTokenData: {
|
|
74
|
+
address: string;
|
|
75
|
+
name: string;
|
|
76
|
+
symbol: string;
|
|
77
|
+
decimals: {
|
|
78
|
+
[chainId: number]: number;
|
|
79
|
+
};
|
|
77
80
|
};
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
token0: {
|
|
82
|
+
address: string;
|
|
83
|
+
symbol: string;
|
|
84
|
+
name: string;
|
|
85
|
+
decimals: {
|
|
86
|
+
[chainId: number]: number;
|
|
87
|
+
};
|
|
85
88
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
token1: {
|
|
90
|
+
address: string;
|
|
91
|
+
symbol: string;
|
|
92
|
+
name: string;
|
|
93
|
+
decimals: {
|
|
94
|
+
[chainId: number]: number;
|
|
95
|
+
};
|
|
93
96
|
};
|
|
97
|
+
dollarValue: number;
|
|
98
|
+
chainId: ChainId;
|
|
99
|
+
blockNumber: number;
|
|
100
|
+
bondArtCollection: string;
|
|
101
|
+
bondPartner: string;
|
|
102
|
+
bondVersion: string;
|
|
103
|
+
createdAddressOwner: string;
|
|
104
|
+
createdAt: number;
|
|
105
|
+
payoutTokenPrice: string;
|
|
94
106
|
};
|
|
95
|
-
|
|
107
|
+
contractAddress: string;
|
|
96
108
|
chainId: ChainId;
|
|
97
|
-
blockNumber: number;
|
|
98
|
-
bondArtCollection: string;
|
|
99
|
-
bondPartner: string;
|
|
100
|
-
bondVersion: string;
|
|
101
|
-
createdAddressOwner: string;
|
|
102
|
-
createdAt: number;
|
|
103
|
-
payoutTokenPrice: string;
|
|
104
109
|
};
|
|
105
|
-
contractAddress: string;
|
|
106
|
-
chainId: ChainId;
|
|
107
110
|
}
|
|
108
111
|
export interface UserBill {
|
|
109
112
|
address: string;
|