Skip to content

Commit

Permalink
Remove OR operator in case statement (#785)
Browse files Browse the repository at this point in the history
  • Loading branch information
krisliew authored Aug 11, 2021
1 parent f74c40b commit d0b1534
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/compareAsBN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit d0b1534

@vercel
Copy link

@vercel vercel bot commented on d0b1534 Aug 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.