safe-apps-sdk
safe-apps-sdk copied to clipboard
throw an error when trying to perform write operations with the safe in read-only mode
The CowSwap team is having an issue where clicking "swap" using a Safe in read-only mode does never resolve resulting in a bad UX: https://github.com/safe-global/safe-apps-sdk/issues/301
I believe the core issue here is that we never resolve/reject the promise if the safe is in read-only mode. We should investigate and return an error in this case
Such operations are:
- signing
- transactions
- requesting permissions