From 5d396b458c7d090ff8536e982f69d22e0e39cdf1 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 31 Oct 2024 06:09:21 +0100 Subject: [PATCH] fix deepbook --- projects/deepbook-sui/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/deepbook-sui/index.js b/projects/deepbook-sui/index.js index f09f1fb55a96..48e9623c26d3 100644 --- a/projects/deepbook-sui/index.js +++ b/projects/deepbook-sui/index.js @@ -34,6 +34,7 @@ function findClosestTvl(data, ts) { // Sum all unique values together let totalTvl = Object.values(aggregatedTvl).reduce((acc, current) => acc + current, 0); + if (+totalTvl<0) return 0 return totalTvl; }