-
Notifications
You must be signed in to change notification settings - Fork 21
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
frontend: Integrate Safe #1755
frontend: Integrate Safe #1755
Conversation
Added a commit for showing the warning if the same address as the connected Safe is chosen for the target address. |
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.
Nice! Some amazing improvements in the structure of the providers and i can already see its paying off. Great job man.
I have a decent amount of nitpicky suggestions and some questions. Once they are addressed happily approving!
frontend/tests/unit/services/transactions/request-manager.spec.ts
Outdated
Show resolved
Hide resolved
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.
Looks perfect, great job! Thanks for addressing all the comments.
Moves any functionality but token adding and switching chains into a new abstract class `BasicEthereumProvider`. Enables to have providers which don't support these functionalities.
…er` optional Not all providers necessarily support these, like for example the Safe provider.
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.
Perfect! ✅
… switching chains In this case only the connected chain should be shown.
…so available There were some issues with the Safe integration. A safe could for example have setup multiple required signatures. Before a tx could fail when continued because the provider was not available. With multisignature safes it must be possible to close the app come back later.
Enables to connect to a gnosis Safe. It adds new autoconnect function for connecting as it is required by Safe.
Enables to use provider specific functionalities in these functions. Also makes the coupling with ethers JsonRPCSigner less. In the future we should instead use our own Signer interface to distinguish between simple providers for read operations and wallets which are able to sign tx.
Safe's use a special internal safeTxHash which is returned from the provider. We cannot use it to get the transaction events or show it in the explorer.
We assumed that our event is always the first one. In cases such as when using a safe provider the transaction call is delegated, therefore other events of the SafeProxy are also included in the transaction.
Safes are only autoconnected and they could not get connected again.
The issue is that a Safe is a contract which only exists on one chain.
… chosen as the target
…nectable and being a contract wallet Makes these features reusable when we introduce other providers
7bad9ca
to
2207b1e
Compare
see #1507
(we still need to open an issue against their repo to get listed in the Safe App)
This was much more work than expected. Some function declarations and interfaces of our internal architecture needed to get changed. A few things are still missing:
The warning if the target address is the same as the Safe's one is missing. Some tests are missing.Maybe it would be nicer to use a flag on theIEthereumProvider
interface if the disconnect should be shown or if the target address should be prefilled.