Skip to content

Commit

Permalink
Merge pull request #131 from greymass/fix-asset
Browse files Browse the repository at this point in the history
Use Big.js to create a non scientific notation version of the string
  • Loading branch information
aaroncox authored Sep 12, 2024
2 parents ad02352 + fe21c96 commit 900bc7d
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 900bc7d

Please sign in to comment.