Skip to content

Commit d8e9586

Browse files
committed
Fix FixedNumber comparison bug (ethers-io#4112).
1 parent bbcfb5f commit d8e9586

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src.ts/utils/fixednumber.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ export class FixedNumber {
430430
* Returns a comparison result between %%this%% and %%other%%.
431431
*
432432
* This is suitable for use in sorting, where ``-1`` implies %%this%%
433-
* is smaller, ``1`` implies %%other%% is larger and ``0`` implies
433+
* is smaller, ``1`` implies %%this%% is larger and ``0`` implies
434434
* both are equal.
435435
*/
436436
cmp(other: FixedNumber): number {
@@ -446,7 +446,7 @@ export class FixedNumber {
446446

447447
// Comnpare
448448
if (a < b) { return -1; }
449-
if (a > b) { return -1; }
449+
if (a > b) { return 1; }
450450
return 0;
451451
}
452452

0 commit comments

Comments
 (0)