Skip to content

Commit fa93739

Browse files
committed
Make getVolumes more resilient to missing data
1 parent d37bc4e commit fa93739

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routes/v1/getVolumes/[blockchainId].js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default fn(async ({ blockchainId }) => {
5353
// The APYs retrieved from getBaseApysFn already include LST APYs
5454
const pools = poolAddressesAndTypes.map(({ address, type }) => {
5555
const lcAddress = lc(address)
56-
const volumeData = poolData.find((data) => lc(data.address) === lcAddress);
56+
const volumeData = poolData?.find((data) => lc(data.address) === lcAddress);
5757

5858
const {
5959
trading_volume_24h: tradingVolume,

0 commit comments

Comments
 (0)