-
Notifications
You must be signed in to change notification settings - Fork 29
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 Safe wallet signature verification #76
Fix Safe wallet signature verification #76
Conversation
Seems related to #63 From Discord:
I don't know about Safe wallet and how easy it is to generate one. But a mainnet example, or potentially Sepolia testnet, would greatly help |
Hi @sbihel, I was able to get a testcase working on Sepolia Eth. Should I create another PR and submit it to the TS SIWE repo? |
The test can just be in this repo for the time being if it's not using mainet I reckon. Yes it will have to be separate, and if there's no public node for Sepolia we can simply configure the test to run on the CI (which is using a private node) |
Got it. I've added a new test case |
Thank you. CI is failing because secrets aren't available for forks |
Got it. Thanks for pushing this over the finish line! |
The current implementation doesn't work for Safe wallets for a couple of reasons:
0x
as the signature, which would cause anIndexError
when callingrecover_message
. Since onlyValueError
is being caught, the exception would bubble up and cause a failure.0x
has to be passed into theisValidSignature
function as-is, but an empty string is currently being passed in due tosignature[2:]
.ContractLogicError
if the signature is invalid, but it's not caught, which also causes an eventual failure.