Closed rin-st closed 3 months ago
reviewing this atm. Will push some tweaks.
Oh. I see that Shiv is already reviewing. I'll leave you to it, Rinat.
Thanks for comments and good suggestions!
also noticed a bug : When you first sign message and verify it's all good but when you change the message and click verify it fails
It is expected behavior, because verifying takes data from input/textarea and then checks if signature is right for that data. But yes, it's not so obvious. To clarify it, I added typed data representation, both current and signed, and a message about it.
Representation:
This is great stuff @rin-st Thank you! Also <3 Shiv for the review.
Merging and we can iterate if needed.
fixes #4
Current version:
https://github.com/scaffold-eth/create-eth-extensions/assets/25638585/a5283272-5b5c-4450-ae43-ad3c68ace78a
Some notes
FIxed. Not sure why, but on Daisy UI Input and Textarea font sizes are different.
I added loading only for backend verification, and its slow only for first verification. Regarding frontend verification, it works using
useVerifyTypedData
hook and it's fast. So I think we don't need it for frontend button. Example of usingisLoading
from the hookhttps://github.com/scaffold-eth/create-eth-extensions/assets/25638585/65d61791-98aa-4cd0-907b-b78f3f33c448
I added it to the top of the page. Also thought about just adding to tooltip, but in Daisy UI only text can be added there (without links, jsx etc)
Also, there are two different fail messages for frontend and backend. Because backend error is parsed, but on frontend
useVerifyTypedData
returns onlytrue
orfalse
and no error whenfalse
. We can adjust error messages but not sure it's necessaryTo test