-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add Safe Transaction Details Parser Feature #33
base: main
Are you sure you want to change the base?
Conversation
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
recheck |
@shayzluf thanks for your contribution. I like the idea of trying to minimize the data that you need to input, but this can be dangerous for the user if the UI is compromised again. We also discussed with Safe team to support url params, so you don't need to input anything. But we are not sure about that, we really want the user to input the params so we make sure they understand what they are copy/paste. Imagine if the safe ui is compromised again, when you're doing this copy paste you're understanding more the Tx at least that's my opinion. If you want to enter less data you always have the safe api method. What do you think about that? |
Thank you for your thoughtful feedback. I understand your security concerns regarding copy-paste functionality, but I'd like to offer some context about how this feature might actually help in certain security scenarios. Regarding the specific Safe UI compromise you mentioned: In that attack, the UI showed users the correct transaction details (which they verified visually) but sent different parameters to be signed behind the scenes. In such a scenario, this feature would actually provide an additional security layer since it works by parsing the visible text content that users see on screen rather than relying on hidden parameters. My initial concept was even more security-focused: I explored implementing OCR on an air-gapped mobile device that would scan the desktop screen and populate the fields using the decoded text. Unfortunately, technical limitations with OCR accuracy (approximately one character error per address) made this approach impractical. This current implementation is primarily a UX improvement that:
You make an excellent point that user understanding is critical. This tool strikes a balance by improving usability while still requiring user validation. Users still need to review and verify the populated fields before signing - the same verification step needed with manual entry - but with significantly reduced tedium. Regarding the Safe API method, while it's a good alternative, many users prefer the transparency of directly seeing and managing transaction parameters, which this feature facilitate |
Summary
This PR introduces a new feature that allows users to paste transaction details copied directly from the Safe UI and automatically populate the transaction form fields. This significantly streamlines the process of recreating or analyzing Safe transactions.
Problem Solved
Previously, users needed to manually input transaction details field by field, which was time-consuming and error-prone. This feature simplifies the workflow by:
The tool acknowledges that user validation of transaction details remains essential regardless of input method - whether manual entry or copy-paste - and encourages users to verify critical transaction information before proceeding.
Implementation
Key Components:
PasteTransactionDetails Component:
Transaction Text Parser:
Smart Detection Features:
User Experience Enhancements:
How to Test
Basic Functionality:
Network Detection:
Handling Edge Cases: