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: Change threshold flow #2085

Merged
merged 3 commits into from
Jun 13, 2023
Merged

feat: Change threshold flow #2085

merged 3 commits into from
Jun 13, 2023

Conversation

usame-algan
Copy link
Member

What it solves

Part of #2067

How this PR fixes it

  • Moves the Change Threshold to the new tx flow
  • Fixes a bug regarding gasLimit estimation in the SignOrExecuteForm

How to test it

  1. Open the Settings page on a 2/n safe
  2. Change the threshold
  3. Observe the new tx flow

Screenshots

Screenshot 2023-06-13 at 11 21 17

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) 🧑‍💻

@usame-algan usame-algan requested a review from katspaugh June 13, 2023 09:21
@github-actions
Copy link

github-actions bot commented Jun 13, 2023

Branch preview

✅ Deploy successful!

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

@usame-algan usame-algan changed the base branch from dev to epic-tx-flow June 13, 2023 09:21
@github-actions
Copy link

github-actions bot commented Jun 13, 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

@@ -34,7 +34,7 @@ const SignOrExecuteForm = (props: SignOrExecuteProps): ReactElement => {
const willExecute = (props.onlyExecute || shouldExecute) && canExecute

// Estimate gas limit
const { gasLimit, gasLimitError } = useGasLimit(safeTx)
const { gasLimit, gasLimitError } = useGasLimit(willExecute ? safeTx : undefined)
Copy link
Member

Choose a reason for hiding this comment

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

Why this change? Gas limit is needed for simulation. If it's only estimated for executions, it should be moved to the ExecuteForm.

Copy link
Member Author

Choose a reason for hiding this comment

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

This was a regression when we refactored this component. Moving it into the ExecuteForm would make the Simulation always fetch the latest block gas limit which is less accurate so I would suggest keeping it here for now.

@usame-algan usame-algan merged commit eb1731e into epic-tx-flow Jun 13, 2023
@usame-algan usame-algan deleted the change-threshold-flow branch June 13, 2023 10:45
@github-actions github-actions bot locked and limited conversation to collaborators Jun 13, 2023
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.

2 participants