@ape.swap/bonds-sdk 1.0.149 → 1.0.150
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.
|
@@ -47,7 +47,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
};
|
|
48
48
|
import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
49
49
|
/** @jsxImportSource theme-ui */
|
|
50
|
-
import {
|
|
50
|
+
import { useEffect, useState } from 'react';
|
|
51
51
|
import { Flex, ThemeUIProvider } from 'theme-ui';
|
|
52
52
|
import axios from 'axios';
|
|
53
53
|
import { ethers } from 'ethers';
|
|
@@ -126,7 +126,7 @@ var Bonds = function (_a) {
|
|
|
126
126
|
setHotBonds(hotBondAddresses);
|
|
127
127
|
});
|
|
128
128
|
}, []);
|
|
129
|
-
var isSoldOut =
|
|
129
|
+
var isSoldOut = function (bond) {
|
|
130
130
|
var _a, _b;
|
|
131
131
|
var thresholdToHide = new BigNumber(100).div((_a = bond.payoutTokenPrice) !== null && _a !== void 0 ? _a : 0);
|
|
132
132
|
if (bond.soldOut)
|
|
@@ -136,7 +136,7 @@ var Bonds = function (_a) {
|
|
|
136
136
|
if (bond.discount && bond.discount > 25 && bond.chainId === ChainId.BASE)
|
|
137
137
|
return true;
|
|
138
138
|
return ((_b = new BigNumber(bond.tokensRemaining)) === null || _b === void 0 ? void 0 : _b.lte(thresholdToHide)) || bond.discount === 100;
|
|
139
|
-
}
|
|
139
|
+
};
|
|
140
140
|
var bondsToRender = [];
|
|
141
141
|
bondData.forEach(function (bond) {
|
|
142
142
|
if (!isSoldOut(bond)) {
|