Closed fjun99 closed 2 years ago
I guess something wrong with useAvatar.
hooks/useAvatar.tsx
comment this out, the error is gone
// const resolver = await web3.library?.getResolver(name)
// const ensAvatar = await resolver?.getAvatar()
// if (ensAvatar?.url) {
// setAvatar({
// name: name,
// url: ensAvatar.url
// })
// } else {
// setAvatar({
// name: '',
// url: makeBlockie(web3.account)
// })
// }
If the problem is coming from the ENS avatar, my suggestion is:
I didn't even know ENS avatar before digging into your PoC repo. So, I think ENS Avatar is not very very important.
Perhaps you can consider removing the ENS avatar feature here to quickly correct this error.
make this change will fix this issue:
const resolver = await web3.library?.getResolver(web3.account)
// const resolver = await web3.library?.getResolver(name)
Don't know what is the meaning as I haven't digged into ENS/ENS.solver.
Hmm, strange. I don't remember this was an issue before?
The problem is trying to getResolver
with an empty name
.
Fixed here https://github.com/wslyvh/proof-of-competence/commit/8c10b8580180154885fadc7a2ca22e0e352e5cb4
But you're right that below should work as well. name
is empty, but web3.account
should not.
make this change will fix this issue:
const resolver = await web3.library?.getResolver(web3.account) // const resolver = await web3.library?.getResolver(name)
Don't know what is the meaning as I haven't digged into ENS/ENS.solver.
great
when switching to an address without an ENS, I get this error.
I have no idea what's going wrong. Still digging. Someone encounter the same issue with ethers...
https://github.com/ethers-io/ethers.js/issues/1051