-
Notifications
You must be signed in to change notification settings - Fork 436
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
feat: edit recovery flow #2824
feat: edit recovery flow #2824
Conversation
Branch preview⏳ Deploying a preview site... |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Coverage report❌ An unexpected error occurred. For more details, check console
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run failedFailed tests: 5/1226. Failed suites: 2/174.
Report generated by 🧪jest coverage report action from fdeb566 |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
export enum UpsertRecoveryFlowFields { | ||
guardian = 'guardian', | ||
txCooldown = 'txCooldown', | ||
txExpiration = 'txExpiration', | ||
emailAddress = 'emailAddress', | ||
} |
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.
Are these field names arbitrary or they actually map to ABI params?
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.
All but guardian
map to the ABI.
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.
It might make sense to move that to services/recovery then. Or somehow import the ABI here.
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.
These are only relevant for the fields in this flow though.
|
||
const onEdit = () => { | ||
// TODO: Display flow | ||
setTxFlow(undefined) |
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.
I think you forgot to add the UpsertRecoveryFlow here?
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.
Indeed, good catch. I've added it in 09cad6f.
@@ -68,13 +67,16 @@ const headCells = [ | |||
{ id: HeadCells.Actions, label: '', sticky: true }, | |||
] | |||
|
|||
// TODO: Migrate section |
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.
Is this still valid?
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.
Yes, the settings need to be merged with spending limits. I've clarified the comment in 09cad6f.
src/services/recovery/setup.ts
Outdated
txData.push(enableModule) | ||
|
||
// Add guardian to cache | ||
_guardians.push(guardianToAdd) |
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.
Do we actually need to add these to the cache?
The guardiansToAdd addresses can not be part of the guardiansToRemove. So they will never be relevant for removing a guardian.
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.
True, I've removed it in 09cad6f.
ESLint Summary View Full Report
Report generated by eslint-plus-action |
What it solves
Resolves #2761
How this PR fixes it
This modifies the
EditRecoveryFlow
to beUpsertRecoveryFlow
which now handles editing a recovery Delay Modifier.How to test it
Open a Safe with a deployed recovery Delay Modifier and navigate to the (note: temporary) settings, observing the edit button that successfully transactions/alters the settings.
Screenshots
Checklist