[UI] Modify token keys
As a user, I want to modify the current token keys
Context
In this accelerator we allow the token creator the possibility to give the SC the possibility to sign the different operations, but algo, if the user wants is able to assign to other accounts the features management. Today we can only set this configuration during the creation process, we should allow the stable coin admin to modify this configuration when it wants.
Description
When a user select a stable coin to operate with and when a user with the public keys matches with the admin key or the current user has the admin role, we should add a new option before the "Danger zone" called:
- Configuration
Within this menu we will add one new option called. In this menu will add more options in the future.
- Keys management
- Go back
Keys management
When the user select keys management option we will display the information regarding the keys like:
Current keys configuration Supply key: 0x7863792f30d186a33073104fee54c1454a144b2c0bfa010bd29eff6aa561ffde Freeze key: SmartContract - 0.0.1234 Pause key: 0x2a2bf16be5c7d4d397f5d9b5de973c1c836f26b47f52e06538cc3c34d6d7500f Delete key: 0x7863792f30d186a33073104fee54c1454a144b2c0bfa010bd29eff6aa561ffde etc. etc. etc.
And below the keys information the following two options:
- Update keys
- Confirm changes (hidden by default until some changes has been made)
- Go back
Updates keys
Display all the keys that are able to change. We should avoid to display the keys that has been set to "None" during the creation process.
- Supply key
- Freeze key
- Pause key
- etc.
When the user select one of them, we should display the following menu: Assign the "supply key" to:
- SmartContract
- Current user key
- Other (If the user select this option, we give them the option to add a public key)
- Go back
When some option has been modified from initial configuration and the user has returned to the Keys management menu, we should display with "Yellow color" the modified key.
Current keys configuration ${\textcolor{yellow}Supply key: SmartContract - 0.0.1234}$ Freeze key: SmartContract - 0.0.1234 some blue text Pause key: 0x2a2bf16be5c7d4d397f5d9b5de973c1c836f26b47f52e06538cc3c34d6d7500f Delete key: 0x7863792f30d186a33073104fee54c1454a144b2c0bfa010bd29eff6aa561ffde etc. etc. etc.
And now, the "Confirm changes" option should be displayed.
Confirm changes
When the user select this option we should ask it: Are you sure you want to apply these changes? Yes - No
If so, update the token modifying the selected keys. After the changes has been made, we should remove the yellow color from previously modified options.
Note: When the user remove from the SmartContract some key, we should remove the assigned accounts that this features role have been granted. Note2: If the user "Go back" without confirming the changes, we shouldn't keep the don't commited changes.
Acceptance criteria
- Given a user with the admin role, I am able to see the Configuration option
- Given a user with the public key matches with the admin key, I am able to see the Configuration option
- Given a user with the admin role, I am able to change some keys to the current smart contract
- Given a user with the public key matches with the admin key, I am able to change some keys to the current smart contract
- Given a user with the admin role, I am able to change some keys to the current user key
- Given a user with the admin role, I am able to change some keys to other public key
- Given a user with the admin role, I am able to change some keys and before confirm the changes, the modified keys are displayed in yellow.
- Given a user with the admin role, I am able to change some keys and before confirm the changes, the modified keys are displayed in yellow, when I "Go back" and open it again the menu, the keys configuration is as is.
- Given a user with the admin role, I am not able to see the "Confirm option" before perform any modification.
- Given a user with the admin role, I am not able to see any option that has the keys set to None
### Tasks
- [ ] Create screen
- [ ] Update doc