Skip to content

Commit

Permalink
fix: number formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
avsetsin committed Mar 23, 2024
1 parent 105bc56 commit 3cc70a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions programs/staking-module/simple-dvt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ const expectedStETHAddress = lidoAddress;
const expectedWstETHAddress = wstethAddress;
const expectedSplitMainAddress = splitMainAddress;

const intl = new Intl.NumberFormat('en-GB', { minimumFractionDigits: 2 });
const intl = new Intl.NumberFormat('en-GB', { minimumFractionDigits: 5, maximumFractionDigits: 5 });

const formatETH = (wei: bigint) => {
return intl.format(Number(wei / 10n ** 15n) / 1000);
return intl.format(Number(wei) / 1e18);
};

const getFormattedAccountInfo = async (account: string) => {
Expand Down

0 comments on commit 3cc70a3

Please sign in to comment.