Skip to content
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: recovery proposal flow #2810

Merged
merged 26 commits into from
Nov 20, 2023
Merged

feat: recovery proposal flow #2810

merged 26 commits into from
Nov 20, 2023

Conversation

iamacook
Copy link
Member

What it solves

Resolves #2764

How this PR fixes it

This adds a new transaction flow for proposing a recovery attempt from a template "Recovery" section of the settings (later to be moved).

How to test it

Open the "Recovery" section of a Safe and observe a new area that allows for the enabling of recovery. Ensuring that the recovery has been enabled (possible via the same section), a "Propose recovery" button will take you through a new flow according to the designs.

Screenshots

propose-recovery

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

@iamacook iamacook linked an issue Nov 14, 2023 that may be closed by this pull request
6 tasks
Copy link

github-actions bot commented Nov 14, 2023

Branch preview

✅ Deploy successful!

https://propose_recovery--walletweb.review-wallet-web.5afe.dev

Copy link

github-actions bot commented Nov 14, 2023

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 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

github-actions bot commented Nov 14, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
75.37% (+0.06% 🔼)
10372/13762
🔴 Branches
50.21% (+0.22% 🔼)
2122/4226
🔴 Functions
58.02% (+0.1% 🔼)
1548/2668
🟡 Lines
76.93% (+0.06% 🔼)
9386/12200
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / transaction.ts
98.48% 95.65% 100% 98.28%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / recoverySlice.ts
56.25% (-21.53% 🔻)
100% 0%
80% (-20% 🔻)
🔴
... / dispatch.ts
48.34% (-1.3% 🔻)
61.11%
30.77% (-1.23% 🔻)
47.18% (-1.3% 🔻)
🟡
... / index.tsx
67.5%
12% (-1.64% 🔻)
33.33% 65.79%
🟢
... / index.tsx
87.18% (-2.18% 🔻)
85.71%
70% (-2.73% 🔻)
96.97% (-0.59% 🔻)

Test suite run success

1172 tests passing in 164 suites.

Report generated by 🧪jest coverage report action from 365c3da

Copy link

github-actions bot commented Nov 20, 2023

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 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Base automatically changed from enable-recovery to recovery-epic November 20, 2023 11:12
@iamacook iamacook marked this pull request as ready for review November 20, 2023 11:52
@@ -45,7 +51,7 @@ const TxSimulationBlock = ({ transactions, disabled, gasLimit }: TxSimulationPro

simulateTransaction({
safe,
executionOwner: wallet.address,
executionOwner: isRecovery ? safe.owners[0].value : wallet.address,
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it's better to pass executionOwner instead of isRecovery?

Copy link
Member Author

Choose a reason for hiding this comment

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

The "guardian" (wallet.address) is unlikely an owner of the Safe so we have to explicitly pass one. The simulation would otherwise fail.

Copy link
Member

Choose a reason for hiding this comment

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

I meant the prop of TxSimulationBlock. Instead of passing isRecovery which is too specific, lift that logic to the caller and pass an optional executionOwner instead, with a fallback to wallet.address.

Copy link
Member Author

Choose a reason for hiding this comment

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

I commited the suggestion directly to the epic branch in ba3b706.

@iamacook iamacook merged commit d4f415f into recovery-epic Nov 20, 2023
11 checks passed
@iamacook iamacook deleted the propose-recovery branch November 20, 2023 17:46
@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Recovery] Propose recovery attempt
2 participants