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

[WIP] Delegates management PoC #3917

Draft
wants to merge 12 commits into
base: dev
Choose a base branch
from
Draft

Conversation

DiogoSoaress
Copy link
Member

@DiogoSoaress DiogoSoaress commented May 27, 2022

What it solves

Part of safe-global/safe-pm#85

How this PR fixes it

A new Settings page was added under Delegates where it is possible to manage Safe delegates through the UI

How to test it

Go to Settings/Delegates and if you are a Safe's owner you will be able to add/remove delegates and modify existent delegates labels

Todo tasks

Allow to delete all delegates

  • Only allow owners to edit/remove

Screenshots

Screenshot 2022-05-27 at 09 10 58

@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented May 27, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 1 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@coveralls
Copy link

coveralls commented May 27, 2022

Pull Request Test Coverage Report for Build 2473926990

  • 0 of 118 (0.0%) changed or added relevant lines in 12 files are covered.
  • 3843 unchanged lines in 403 files lost coverage.
  • Overall coverage decreased (-36.6%) to 0.0%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/config/index.ts 0 1 0.0%
src/routes/safe/components/Settings/Delegates/AddDelegateModal/style.ts 0 1 0.0%
src/routes/safe/components/Settings/Delegates/EditDelegateModal/style.ts 0 1 0.0%
src/routes/safe/components/Settings/Delegates/RemoveDelegateModal/style.ts 0 1 0.0%
src/routes/safe/components/Settings/Delegates/style.ts 0 1 0.0%
src/routes/safe/components/Settings/index.tsx 0 2 0.0%
src/logic/delegates/api/delegates.ts 0 3 0.0%
src/routes/safe/components/Settings/Delegates/RemoveDelegateModal/index.tsx 0 5 0.0%
src/routes/safe/components/Settings/Delegates/EditDelegateModal/index.tsx 0 8 0.0%
src/routes/safe/components/Settings/Delegates/AddDelegateModal/index.tsx 0 10 0.0%
Files with Coverage Reduction New Missed Lines %
src/components/CustomIconText/index.tsx 1 0%
src/components/forms/Field/index.tsx 1 0%
src/components/layout/Tooltip/index.tsx 1 0%
src/components/Providers/index.tsx 1 0%
src/components/ScanQRModal/style.ts 1 0%
src/components/WalletSwitch/index.tsx 1 0%
src/config/chain.d.ts 1 0%
src/logic/collectibles/store/actions/fetchCollectibles.ts 1 0%
src/logic/config/store/actions/index.ts 1 0%
src/logic/contracts/contracts.d.ts 1 0%
Totals Coverage Status
Change from base Build 2468503349: -36.6%
Covered Lines: 0
Relevant Lines: 9658

💛 - Coveralls

@github-actions
Copy link

Deployment links

Mainnet     🟣 Polygon     🟠 Rinkeby

@iamacook
Copy link
Member

The CRUD looks great! Is it not possible to use the CGW atm? We should also save the delegates to the store so we can reference it to allow for delegate transaction proposal.

@DiogoSoaress
Copy link
Member Author

Despite having set a task to "implement delete all delegates" it seems there is no such endpoint AFAIK -> https://github.com/safe-global/safe-client-gateway/blob/main/src/routes/delegates/routes.rs

@iamacook
Copy link
Member

Despite having set a task to "implement delete all delegates" it seems there is no such endpoint AFAIK -> https://github.com/safe-global/safe-client-gateway/blob/main/src/routes/delegates/routes.rs

There are two delete endpoints. You can also use my open gateway SDK PR as a reference.

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.

None yet

3 participants