Skip to content

Commit

Permalink
formattedFilToBigInt: fix float to bigint error due to lack of precis…
Browse files Browse the repository at this point in the history
…ion (#1943)
  • Loading branch information
juliangruber authored Dec 2, 2024
1 parent 7b6fb74 commit 186feec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion renderer/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function formatFilValue (value = '') {
}

export function formattedFilToBigInt (value: string) {
return BigInt(Number(value) * 1e18)
return BigInt(Math.floor(Number(value) * 1e18))
}

export function bigIntFilToNumber (value: bigint) {
Expand Down

0 comments on commit 186feec

Please sign in to comment.