Skip to content

Commit f1b3e49

Browse files
committed
fix bigdecimal overflow
1 parent 0ee618f commit f1b3e49

File tree

1 file changed

+4
-2
lines changed
  • packages/cli/src/commands/positions

1 file changed

+4
-2
lines changed

packages/cli/src/commands/positions/list.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { userPositions } from '@aave/client/actions';
1414
import * as common from '../../common.js';
1515

1616
export default class ListPositions extends common.V4Command {
17-
static override description = 'List user positions for a specific chain (API requires at least one chain ID)';
17+
static override description = 'List user positions across chains';
1818

1919
static override flags = {
2020
user: common.address({
@@ -77,7 +77,9 @@ export default class ListPositions extends common.V4Command {
7777
`${item.totalSupplied.current.symbol}${item.totalSupplied.current.value.toFixed(2)}`,
7878
`${item.totalDebt.current.symbol}${item.totalDebt.current.value.toFixed(2)}`,
7979
item.healthFactor.current?.toFixed(2) ?? 'N/A',
80-
item.totalCollateral.current.value.toNumber() > 0 ? 'Yes' : 'No',
80+
Number(item.totalCollateral.current.value.toFixed(0)) > 0
81+
? 'Yes'
82+
: 'No',
8183
]),
8284
);
8385
return ok(positions);

0 commit comments

Comments
 (0)