Skip to content

Commit 6ade1a2

Browse files
committed
fix: adjust price formatting to account for meme coins
1 parent 3ce0b7e commit 6ade1a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export const logSuccess = (message: string) => {
1414

1515
export const format = (price: number) => {
1616
const decimalPart = price.toString().split('.')[1]
17-
// If the decimal part starts with 0000, it's likely a meme coin
17+
// If the decimal part starts with 000, it's likely a meme coin
1818
// and we want to show more decimal places to avoid showing 0.00
19-
const isMemeCoin = decimalPart && decimalPart.slice(0, 4) === '0000'
19+
const isMemeCoin = decimalPart && decimalPart.slice(0, 3) === '000'
2020

2121
return new Intl.NumberFormat('en-US', {
2222
style: 'currency',

0 commit comments

Comments
 (0)