Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

(Feature) Advanced Settings - Safe Details #1074

Merged
merged 72 commits into from
Jul 18, 2020

Conversation

fernandomg
Copy link
Contributor

@fernandomg fernandomg commented Jun 26, 2020

This PR closes #934, by:

  • Adding a new Advanced section under the Settings tabs
  • Making the Safe aware of the modules and listing modules enabled for it
  • Allowing an Owner to trigger an intent to disable a Module
  • Specifying the current Safe's nonce

it's a WIP, still, need to clean-up the Advanced components and use safe-react-components where possible

Also:

there's a lot of duplicated code, just copying functionalities and building basic structure for the section
@fernandomg fernandomg self-assigned this Jun 26, 2020
@fernandomg
Copy link
Contributor Author

Current status:

image

image

@gnosis-info
Copy link

Travis automatic deployment:
https://pr1074--safereact.review.gnosisdev.com/app

# Conflicts:
#	src/routes/safe/store/actions/fetchSafe.ts
#	src/routes/safe/store/models/safe.ts
#	src/routes/safe/store/reducer/safe.ts
Not so sure about how robust the fix is. But allow me to continue developing
- changed `remoteModules` in favor of `remoteModulesPaginated`, so we can properly have track of the `prevModule` for every module
- refactored how module is stored from an array of `moduleAddress`es, to an array of `[moduleAddress, prevModuleAddress]`
- Implemented the RemoveModule by copying the `RemoveSafeModule` implementation
- TODO: display data
@fernandomg
Copy link
Contributor Author

disable module (typo in modal title fixed)

removing-module


view without modules
image

Comment on lines 265 to 266
By removing a Module you will sign a new Safe Transaction. The Safe will not be able to interact with it
any longer until it is enabled again through a new Safe Transaction.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can someone please review this message?

@fernandomg fernandomg marked this pull request as ready for review July 1, 2020 00:42
@gnosis-info
Copy link

Travis automatic deployment:
https://pr1074--safereact.review.gnosisdev.com/app

@lukasschor
Copy link
Member

For the side menu, please use this icon:

image

From: https://zpl.io/a8g9EgK

@lukasschor
Copy link
Member

For the copy, you can use this:

After removing this module, any feature or app that uses this module might no longer work. If this Safe requires more then one signature, the module removal will have to be confirmed by other owners as well.

@fernandomg
Copy link
Contributor Author

fernandomg commented Jul 1, 2020

For the side menu, please use this icon:

From: zpl.io/a8g9EgK

This needs a safe-react-component update: 5afe/safe-react-components#29

@gnosis-info
Copy link

Travis automatic deployment:
https://pr1074--safereact.review.gnosisdev.com/app

@gnosis-info
Copy link

Travis automatic deployment:
https://pr1074--safereact.review.gnosisdev.com/app

@fernandomg fernandomg requested a review from mmv08 July 17, 2020 17:28
@gnosis-info
Copy link

Travis automatic deployment:
https://pr1074--safereact.review.gnosisdev.com/app

Copy link
Contributor

@francovenica francovenica left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re tested the same way as before, adding and deleting a module
The steps to add a module now are:

-Create a contrac interaction
-Your own safe as recipient
-The ABI in this page
-Use method "enableModule"
-This module address as input 0x34cfac646f301356faa8b21e94227e3583fe3f5f
-Sign the tx

Had to sign to add the module and delete it.
Adding and removal worked just fine

@fernandomg
Copy link
Contributor Author

@lukasschor, @mikheevm this is ready to be re-reviewed

@gnosis-info
Copy link

Travis automatic deployment:
https://pr1074--safereact.review.gnosisdev.com/app

@gnosis-info
Copy link

Travis automatic deployment:
https://pr1074--safereact.review.gnosisdev.com/app

@fernandomg fernandomg requested a review from Agupane July 17, 2020 21:40
@gnosis-info
Copy link

Travis automatic deployment:
https://pr1074--safereact.review.gnosisdev.com/app

src/routes/safe/store/actions/createTransaction.ts Outdated Show resolved Hide resolved
src/routes/safe/store/actions/createTransaction.ts Outdated Show resolved Hide resolved
src/routes/safe/store/actions/createTransaction.ts Outdated Show resolved Hide resolved
@fernandomg fernandomg requested a review from mmv08 July 18, 2020 13:08
src/store/index.ts Outdated Show resolved Hide resolved
src/store/index.ts Outdated Show resolved Hide resolved
@gnosis-info
Copy link

Travis automatic deployment:
https://pr1074--safereact.review.gnosisdev.com/app

@gnosis-info
Copy link

Travis automatic deployment:
https://pr1074--safereact.review.gnosisdev.com/app

@mmv08 mmv08 merged commit 57248c6 into development Jul 18, 2020
@mmv08 mmv08 deleted the feature/#934-advanced-settings branch July 18, 2020 13:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Advanced] Safe Details
7 participants