Closed stephancill closed 7 months ago
I'm in the exact same situation - Hopefully this gets fixed soon!
So am I. When will this be resolved? 😢
@jellohouse @corbinpage this patch is what fixed it for our use case (we're only using local accounts). might be of use to you https://github.com/mod-protocol/mod/blob/main/patches/%40zoralabs%2Bprotocol-sdk%2B0.5.0.patch
Ok thanks - yes that works for now :)
Hey! We've totally missed this and can integrate a fix soon.
Error & Repro
I have the following setup for creating premints on behalf of another account:
On submit, I get a viem error:
What's wrong
When you pass a string instead of an
Account
to theaccount
parameter of viem'swalletClient.signTypedData
, it falls back to being constructed as JSON RPCAccount
object rather than the more appropriate local account type, which is the condition for the signature to work with local accounts as mentioned in the docs:Solution
The solution is to explicitly pass the full
Account
object to thewalletClient.signTypedData
call here: https://github.com/ourzora/zora-protocol/blob/main/packages/protocol-sdk/src/premint/premint-client.ts#L669C10-L676One way of doing that (which is potentially also the most flexible) would most likely be to accept an
Account | Address
here: https://github.com/ourzora/zora-protocol/blob/main/packages/protocol-sdk/src/premint/premint-client.ts#L328 and handle the differences downstream.Let me know if I can provide more info