Skip to content

Commit

Permalink
Use Big.js to create a non scientific notation version of the string
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Sep 10, 2024
1 parent 55d4969 commit fe21c96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/components/input/asset.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
let number = $derived(input && satisfiesNumber ? Big(input) : Big(0));
/** The number of decimal places used in the string input */
const decimals = $derived(String(number).split('.')[1]?.length || 0);
const decimals = $derived(number.toFixed().split('.')[1]?.length || 0);
/** The symbol of the asset */
let symbol: Asset.Symbol = $state(_value.symbol);
Expand Down

0 comments on commit fe21c96

Please sign in to comment.