Giter VIP home page Giter VIP logo

Comments (6)

hellno avatar hellno commented on August 15, 2024 1

Thank you! this led me to make a leap in fixing this. The initial problem was letting the wallet client pick the default chainId, which was optimism in my case. Obvious fix is setting the wallet client chainId to mainnet 🔥😅🔥

still not 100% done but getting there 🙌🏼

from hub-monorepo.

hellno avatar hellno commented on August 15, 2024 1

Yes so that was my initial problem. Difference between verifying contract chainId and the chainId that was set as default for walletClient.
I'm tracking the progress to fix this here: hero-org/herocast#146

from hub-monorepo.

0x330a avatar 0x330a commented on August 15, 2024

is the error thrown by signTypedDataAsync? does signTypedDataAsync return a 0x${string} that you can use directly, without needing the toHex() call? I copied the domain, types and contract address from the hub-nodejs code and seems to be working for me

from hub-monorepo.

hellno avatar hellno commented on August 15, 2024

thanks @0x330a! I've tried your approach but still no luck. I've added it in a rename flow, so it's independent of account registration (see commit here: hero-org/herocast@750e3a0)

Still getting an Unknown RPC Error with this:
image

from hub-monorepo.

0x330a avatar 0x330a commented on August 15, 2024

My implementation might be similar to what you're doing, although I had to call it out to a serverless function to do the fname API I think (I didn't actually try but I assumed there would be a cors issue from a react frontend)

https://github.com/0x330a-public/terminex/blob/master/src%2FNameEditor.tsx

The register name request just forwards that as a post to the fname transfer endpoint so the body should be the same, apologies for mess of code I'm not really a web/react dev but hopefully the code helps

from hub-monorepo.

0x330a avatar 0x330a commented on August 15, 2024

Actually one fun thing I discovered was that certain wallets (MM) will sometimes not allow you to sign EIP-712 data if your current chainId for a connected session isn't the one that is the verifying contract's chainId. Not sure if that's happening on your end as well but could be something to keep in mind 😂

from hub-monorepo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.