Closed psparacino closed 7 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
carbonmark | ✅ Ready (Inspect) | Visit Preview | Feb 14, 2024 6:22pm | |
carbonmark-api | ✅ Ready (Inspect) | Visit Preview | Feb 14, 2024 6:22pm | |
demo-integration | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Feb 14, 2024 6:22pm |
klimadao-app | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Feb 14, 2024 6:22pm |
Description
The useWeb3 hook is returning a checksum address while the subgraph returns only lowercase addresses.
This is causing a mismatch in several areas where hooks are not returning the correct listings, which leads to allowance errors etc.
For ex in the
useGetUserswalletorhandle
hook the useWeb3 hook is returning a checksum address while the subgraph is returning a lowercase address.The hook checks if two addresses are strictly equal to determine whether to return expired listing or not. Therefore it returns only current listings, as the user isn't recognized as the listing owner.
This is a cascading issue, as those listings are also used to determine the correct allowance. Because only current listing are returned the user can actually lower their allowance below what the contract requires (all listings including expired as well as pending listing) as the expired listing amounts are not taken into account.
There should either be consistency to checksum or lowercase. Given the subgraph only uses lowercase it would probably be easier to use lowercase as the consistent format and then convert to checksum if ever required.
Related Ticket
Closes #2243
How to Test