File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,11 @@ const SOCIAL_SHARE_TEXT = `I'm in! 🎄
4444Just got my tickets for the Oasis Xmas Roffle — 10 winners sharing up to 1M $ROSE!
4545Get yours here: ${ window . location . href } `
4646
47+ /** Adds thousands separators but might lose precision */
48+ function formatEtherLocale ( valueInBaseUnits : bigint ) {
49+ return parseFloat ( formatEther ( valueInBaseUnits ) ) . toLocaleString ( )
50+ }
51+
4752export function App ( ) {
4853 const acc = useAccount ( )
4954 const { chains : wagmiChains } = useConfig ( )
@@ -326,8 +331,10 @@ export function App() {
326331 Join the Oasis Christmas raffle!
327332 < br />
328333 < br />
329- The prize pool starts at { initialPot ?. data ? formatEther ( initialPot . data ) : '...' } ROSE and
330- grows with every ticket purchased.
334+ The prize pool starts at { initialPot ?. data
335+ ? formatEtherLocale ( initialPot . data )
336+ : '...' } { ' ' }
337+ ROSE and grows with every ticket purchased.
331338 < br />
332339 Each ticket costs { ticketPrice . data ? formatEther ( ticketPrice . data ) : '...' } ROSE.
333340 </ p >
@@ -652,7 +659,7 @@ export function App() {
652659 Current prize pool
653660 </ p >
654661 < p className = "font-['Mountains_of_Christmas',cursive] leading-[56px] text-[48px] text-white" >
655- { raffleBalance . data ?. value ? formatEther ( raffleBalance . data ?. value ) : '' }
662+ { raffleBalance . data ?. value ? formatEtherLocale ( raffleBalance . data ?. value ) : '' }
656663 < span className = "hero-text-muted" > ROSE</ span >
657664 </ p >
658665 </ div >
You can’t perform that action at this time.
0 commit comments