Skip to content

Commit 550b2b2

Browse files
committed
total supply guard
1 parent d1f141d commit 550b2b2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/adaptors/pico-staked-sol/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ const apy = async () => {
1414
),
1515
]);
1616

17+
if (!Number.isFinite(totalSupply))
18+
throw new Error(`Unable to fetch total supply for ${PICOSOL_MINT}`);
19+
1720
const currentPrice = priceRes.data.coins[priceKey]?.price;
1821
if (!currentPrice) throw new Error('Unable to fetch picoSOL price');
1922

0 commit comments

Comments
 (0)