• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / marketplace / 9999902307

18 Jul 2024 11:10PM UTC coverage: 66.468% (-0.2%) from 66.682%
9999902307

Pull #2268

github

meelrossi
fix isBid trade calculation
Pull Request #2268: feat: add accept trade flow

2635 of 5152 branches covered (51.15%)

Branch coverage included in aggregate %.

71 of 128 new or added lines in 11 files covered. (55.47%)

3 existing lines in 2 files now uncovered.

7714 of 10418 relevant lines covered (74.04%)

77.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

28.57
/webapp/src/components/Bid/utils.ts
1
import { ethers } from 'ethers'
1✔
2
import { ChainId } from '@dcl/schemas'
3
import { getNetworkProvider } from 'decentraland-dapps/dist/lib'
1✔
4
import ERC721ABI from '../../contracts/ERC721.json'
1✔
5

6
export const fetchContractName = async (address: string, chainId: ChainId) => {
1✔
NEW
7
  try {
×
NEW
8
    if (!address || !chainId) {
×
NEW
9
      return null
×
10
    }
11

NEW
12
    const provider = await getNetworkProvider(chainId)
×
13

NEW
14
    const erc721 = new ethers.Contract(address, ERC721ABI, new ethers.providers.Web3Provider(provider))
×
15

NEW
16
    return (await erc721.name()) as string
×
17
  } catch (e) {
NEW
18
    return null
×
19
  }
20
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc