Skip to content

Commit 2464276

Browse files
author
tombertrand
committed
Fix #3 UI Disappears on Distribution with Log Scale on and Include known exchanges off
1 parent 2842bcf commit 2464276

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pages/Distribution/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,14 @@ const Distribution = () => {
8080
): void => {
8181
const calcAccounts =
8282
accounts - (knownExchangeDistribution[i]?.accounts || 0);
83-
const calcBalance = new BigNumber(balance)
83+
let calcBalance = new BigNumber(balance)
8484
.minus(knownExchangeDistribution[i]?.balance || 0)
8585
.toNumber();
8686

87+
if (calcBalance < 0 && !calcAccounts) {
88+
calcBalance = 0;
89+
}
90+
8791
tmpTotalAccounts += calcAccounts;
8892
tmpTotalBalance += calcBalance;
8993

0 commit comments

Comments
 (0)