From d0b1534d105e5dcb3790c65d4bb04ff1d2dbc575 Mon Sep 17 00:00:00 2001 From: Kris Liew <39853992+krisliew@users.noreply.github.com> Date: Wed, 11 Aug 2021 17:45:05 +0800 Subject: [PATCH] Remove OR operator in case statement (#785) --- src/utils/compareAsBN.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/compareAsBN.ts b/src/utils/compareAsBN.ts index 8038773d9..f3c519706 100644 --- a/src/utils/compareAsBN.ts +++ b/src/utils/compareAsBN.ts @@ -8,7 +8,8 @@ export default function compareAsBN(balance: string, price: string): boolean { const compare = aBN.comparedTo(bBN) switch (compare) { - case 1 || 0: // balance is greater or equal to price + case 1: // balance is greater than price + case 0: // balance is equal to price return true default: return false