Skip to content

Commit

Permalink
fix(site): eth rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
PoisonPhang authored and cor committed Oct 18, 2023
1 parent 40b00d4 commit 5dfac6b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions site/src/lib/format.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
export const toFixedPoint = (value: bigint, decimals: number) => {
let right = BigInt(value) % BigInt(10 ** decimals);
let left = BigInt(value) - right;
console.log("value: " + value)
let right = BigInt(value) % BigInt(10) ** BigInt(decimals);
console.log("right: " + right)
let left = BigInt(value) / BigInt(10) ** BigInt(decimals);
console.log("left: " + left)

return left.toString().concat('.', right.toString().padStart(decimals, '0'));
};
Expand Down

0 comments on commit 5dfac6b

Please sign in to comment.