@ape.swap/bonds-sdk 1.0.152 → 1.0.154
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.
|
@@ -58,7 +58,7 @@ import { defaultTheme } from '../../theme';
|
|
|
58
58
|
import Svg from '../uikit/Svg';
|
|
59
59
|
import '../../scss/Bonds.scss';
|
|
60
60
|
import { BigNumber } from 'bignumber.js';
|
|
61
|
-
import { ChainId } from '
|
|
61
|
+
import { ChainId } from '../../config/Chains';
|
|
62
62
|
var Bonds = function (_a) {
|
|
63
63
|
var connectionString = _a.connectionString;
|
|
64
64
|
var _b = useWeb3React(), account = _b.account, isActive = _b.isActive;
|
|
@@ -112,7 +112,11 @@ var Bonds = function (_a) {
|
|
|
112
112
|
axios.get('https://realtime-api.ape.bond/bonds').then(function (response) {
|
|
113
113
|
var bonds = response.data.bonds;
|
|
114
114
|
setBondData(bonds);
|
|
115
|
+
console.log("BONDS");
|
|
116
|
+
console.log(bonds);
|
|
115
117
|
var bondsToRender = bondData.filter(function (bond) { return !isSoldOut(bond); });
|
|
118
|
+
console.log("BONDS TO RENDER");
|
|
119
|
+
console.log(bondsToRender);
|
|
116
120
|
setBondData(bondsToRender);
|
|
117
121
|
});
|
|
118
122
|
}, []);
|
|
@@ -129,9 +133,11 @@ var Bonds = function (_a) {
|
|
|
129
133
|
var thresholdToHide = new BigNumber(100).div((_a = bond.payoutTokenPrice) !== null && _a !== void 0 ? _a : 0);
|
|
130
134
|
if (bond.soldOut)
|
|
131
135
|
return true;
|
|
136
|
+
if (bond.discount == null)
|
|
137
|
+
return true;
|
|
132
138
|
if (!bond.tokensRemaining)
|
|
133
139
|
return false;
|
|
134
|
-
if (bond.discount && bond.discount > 25 && bond.chainId === ChainId.BASE)
|
|
140
|
+
if (bond.discount && bond.discount > 25 && bond.chainId === ChainId.BASE /*BASE*/)
|
|
135
141
|
return true;
|
|
136
142
|
return ((_b = new BigNumber(bond.tokensRemaining)) === null || _b === void 0 ? void 0 : _b.lte(thresholdToHide)) || bond.discount === 100;
|
|
137
143
|
}, []);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum ChainId {
|
|
2
|
+
MAINNET = 1,
|
|
3
|
+
MATIC = 137,
|
|
4
|
+
MATIC_TESTNET = 80001,
|
|
5
|
+
BSC = 56,
|
|
6
|
+
BSC_TESTNET = 97,
|
|
7
|
+
TLOS = 40,
|
|
8
|
+
ARBITRUM = 42161,
|
|
9
|
+
INEVM_TESTNET = 2424,
|
|
10
|
+
INEVM = 2525,
|
|
11
|
+
SEPOLIA = 11155111,
|
|
12
|
+
LINEA = 59144,
|
|
13
|
+
LIGHTLINK = 1890,
|
|
14
|
+
IOTA_TESTNET = 1075,
|
|
15
|
+
IOTA = 8822,
|
|
16
|
+
BASE = 8453
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|