Skip to content

Commit

Permalink
Fix FixedNumber comparison bug (ethers-io#4112).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo authored and Woodpile37 committed Jan 14, 2024
1 parent 3339e18 commit 4313f57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src.ts/utils/fixednumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ export class FixedNumber {
* Returns a comparison result between %%this%% and %%other%%.
*
* This is suitable for use in sorting, where ``-1`` implies %%this%%
* is smaller, ``1`` implies %%other%% is larger and ``0`` implies
* is smaller, ``1`` implies %%this%% is larger and ``0`` implies
* both are equal.
*/
cmp(other: FixedNumber): number {
Expand All @@ -446,7 +446,7 @@ export class FixedNumber {

// Comnpare
if (a < b) { return -1; }
if (a > b) { return -1; }
if (a > b) { return 1; }
return 0;
}

Expand Down

0 comments on commit 4313f57

Please sign in to comment.