Skip to content

Commit 72de61e

Browse files
committed
fix ethers formatUnits change
1 parent e1523c7 commit 72de61e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/frontend/utils/calculateValue.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import web3 from 'web3'
2-
import { utils } from 'ethers'
2+
import { formatUnits } from 'ethers'
33
import { TokenTx, TokenType, TransactionType } from '../../types'
44
import BN from 'bn.js'
55
import { fromWeiNoTrailingComma } from './fromWeiNoTrailingComma'
@@ -46,7 +46,7 @@ export const calculateTokenValue = (
4646
}
4747

4848
console.log('calculateTokenValue - attempting formatUnits with:', tokenTx.tokenValue, decimalsValue)
49-
const formatted = utils.formatUnits(tokenTx.tokenValue, decimalsValue)
49+
const formatted = formatUnits(tokenTx.tokenValue, decimalsValue)
5050
console.log('calculateTokenValue - formatUnits result:', formatted)
5151

5252
return fullValue ? formatted : roundTokenValue(formatted)

0 commit comments

Comments
 (0)