The Badge

The Badge is a decentralized certification platform built on Ethereum that allows tokenizing any piece of information under the concept of badges (non-transferable and verifiable NFTs).

  • 0 Raised
  • 60 Views
  • 0 Judges

Categories

  • Gnosis Chain - dApp - Bounty
  • Wallet Connect - Best Public Good
  • Wallet Connect - Best Mobile UX
  • IPFS / Filecoin - Storage Wizzard
  • Metamask - Anything goes

Description

Project Submission

Bounties 



---- WalletConnect Bounty Web3Modal V2 ----

We applied for the Best Mobile UX and the Best Public Good bounties but we found issues with the integration with Web3Modal V2, when we want to send a transaction we got the following error:

----

Error: underlying network changed (event="changed", network={"name":"unspecified","chainId":0,"ensAddress":null,"_defaultProvider":null}, detectedNetwork={"name":"xdai","chainId":100,"ensAddress":null,"_defaultProvider":null}, code=NETWORK_ERROR, version=providers/5.7.2)

    at Logger.makeError (index.js?dd68:224:1)

    at Web3Provider.eval (base-provider.js?4ba1:998:1)

----

The read-only features work well, account reading, network switch, etc. We found a trick to make the transactions work partially using refetch(). Seems that the preconfigured network inside the library is 0 and does not get updated until we call that function. Once we do that, if the user tries to send again the transaction it works, we tried awaiting the promise of refetch() but seems not working.

This mean that the app is functional, but if you want to send a transaction for creating a badge, you need to press the submit two times in order to dispatch the transaction:

You can check the fix here: 

https://github.com/thebadge/thebadge-poc-ethlisbon22/blob/1f6d00e3dfc219a21be6d81ca9417b01c29c57f9/src/page_partials/badgeTypes/offChain/MintGithubPreview.tsx#L73


Please note that the solution with web3modal v2 is in another branch called web3modal

Just in case we upload a screenshot with the web3modalv2: