fix: prices passed in scientific notation (#5070)

fix prices passed in scientific notation
This commit is contained in:
Charles Bachmeier 2022-11-02 13:48:02 -07:00 committed by GitHub
parent d74c05008b
commit fda9d29d5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -133,7 +133,9 @@ export function useAssetsQuery(
const assets: GenieAsset[] = data.nftAssets?.edges?.map((queryAsset: { node: any }) => {
const asset = queryAsset.node
const ethPrice = parseEther(asset.listings?.edges[0]?.node.price.value?.toString() ?? '0').toString()
const ethPrice = parseEther(
asset.listings?.edges[0]?.node.price.value?.toLocaleString('fullwide', { useGrouping: false }) ?? '0'
).toString()
return {
id: asset.id,
address: asset.collection.nftContracts[0]?.address,