11import { motion } from "motion/react"
22import { useEffect , useMemo , useRef , useState } from "react"
3- import { formatGwei } from "viem"
3+ import { formatUnits } from "viem"
44import { useGasPrice } from "wagmi"
55
66import { Box , Button , Collapse , Stack , Typography } from "@mui/material"
@@ -35,14 +35,14 @@ const MobileGasPriceViewer = props => {
3535
3636 const displayedScrollGasPrice = useMemo ( ( ) => {
3737 if ( scrollGasPrice ) {
38- return commafy ( formatGwei ( scrollGasPrice ) . toString ( ) , 3 )
38+ return commafy ( formatUnits ( scrollGasPrice , 6 ) . toString ( ) , 2 )
3939 }
4040 return "-"
4141 } , [ scrollGasPrice ] )
4242
4343 const displayedEthereumGasPrice = useMemo ( ( ) => {
4444 if ( ethereumGasPrice ) {
45- return commafy ( formatGwei ( ethereumGasPrice ) . toString ( ) , 3 )
45+ return commafy ( formatUnits ( ethereumGasPrice , 6 ) . toString ( ) , 2 )
4646 }
4747 return "-"
4848 } , [ ethereumGasPrice ] )
@@ -138,7 +138,7 @@ const MobileGasPriceViewer = props => {
138138 { displayedScrollGasPrice }
139139 </ Typography >
140140 < Typography component = "span" sx = { { color : "inherit" , fontSize : "1.6rem" , lineHeight : "2.4rem" } } >
141- Gwei
141+ Mwei
142142 </ Typography >
143143 </ Stack >
144144 < Collapse in = { gasPricePanelVisible } sx = { { width : "100%" } } timeout = "auto" unmountOnExit >
@@ -169,7 +169,7 @@ const MobileGasPriceViewer = props => {
169169 >
170170 { displayedScrollGasPrice }
171171 </ Typography >
172- < span > Gwei </ span >
172+ < span > Mwei </ span >
173173 < span className = "font-[600]" > Ethereum</ span >
174174 < Typography
175175 sx = { {
@@ -182,7 +182,7 @@ const MobileGasPriceViewer = props => {
182182 >
183183 { displayedEthereumGasPrice }
184184 </ Typography >
185- < span > Gwei </ span >
185+ < span > Mwei </ span >
186186 < Button
187187 sx = { {
188188 fontSize : "1.6rem" ,
0 commit comments