fix: signTransaction updated to work with latest v5 SDK#830
Conversation
|
We're building your pull request over on Zeet. |
| gasPrice: Type.Optional(Type.String()), | ||
| data: Type.Optional(Type.String()), | ||
| value: Type.Optional(Type.String()), | ||
| chainId: Type.Optional(Type.Integer()), |
There was a problem hiding this comment.
Is this gonna break existing users calling without a chain id?
There was a problem hiding this comment.
yes, open to any way to support pre-eip155 signatures as well. I couldn't find a way with the current SDK.
There was a problem hiding this comment.
Tbh signing a tx without a chain id is kinda sus. And I guess it will only break ppl when they upgrade?
Maybe we make it really clear in the release notes
|
A lot of this gets much better with zod schemas, so I have not invested much into make the validation super air tight here (updating to |
PR-Codex overview
This PR focuses on enhancing the
sign-transactionfunctionality by incorporating thethirdwebClient, updating the transaction handling logic, and utilizing theprepareTransactionandtoSerializableTransactionmethods for improved transaction preparation and serialization.Detailed summary
toTransactionTypeimport withthirdwebClient.prepareTransaction,toSerializableTransaction, andgetChain.chainIddefinition to be of typeInteger.chainId,nonce, andtransaction.chainvariable usinggetChain.accountretrieval to use dynamicchainId.prepareTransactionOptionsobject with updated transaction handling.prepareTransactionandtoSerializableTransactionfor transaction preparation and serialization.