-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: 1559 transaction handling #551
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
9 Ignored Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the sig validation 🙏
const CELO_ALFAJORES_CHAIN_ID = 44787; | ||
const CELO_MAINNET_CHAIN_ID = 42220; | ||
|
||
let valid = false; | ||
console.log("rpc request", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed?
const transaction = ethers.utils.parseTransaction( | ||
signedTx.startsWith("0x") ? signedTx : `0x${signedTx}` | ||
); | ||
console.log("parsed transaction", transaction); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log("parsed transaction", transaction); |
signedTx as any | ||
).verifySignature(); | ||
} catch (e) { | ||
console.warn("fromSerializedTx failed", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be error
since this is a failure case?
console.warn("fromSerializedTx failed", e); | |
console.error("fromSerializedTx failed", e); |
transaction.to === tx.to && | ||
transaction.from === tx.from; | ||
} catch (e) { | ||
console.warn("parseTransaction failed", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be an error because it's a failure case not a warning that can be ignored:
console.warn("parseTransaction failed", e); | |
console.error("parseTransaction failed", e); |
@ganchoradkov can we fix up and merge? |
The current validation of
eth_signTransaction
result is not sufficient for handling 1559 responses