Skip to content

fix: prevent duplicate unstake submissions#1309

Open
sirakinb wants to merge 1 commit into
etherisc:developfrom
sirakinb:codex/prevent-unstake-double-submit
Open

fix: prevent duplicate unstake submissions#1309
sirakinb wants to merge 1 commit into
etherisc:developfrom
sirakinb:codex/prevent-unstake-double-submit

Conversation

@sirakinb

Copy link
Copy Markdown

Fixes #204.

This prevents a fast double-click on the Unstake submit button from starting duplicate unstake transactions:

  • adds an immediate ref-based in-flight guard at the form submit boundary
  • disables the submit button while the unstake action is in progress
  • preserves the existing parent transaction flow and step handling
  • adds a regression test that double-clicks the Unstake button and asserts only one unstake call is made

Testing:

  • git diff --check
  • npm run lint -- --file src/components/unstake/unstake_bundle.tsx --file src/components/unstake/unstake_bundle_form.tsx
  • npm test -- --runInBand tests/components/unstake/unstake_bundle_form.test.tsx

@sirakinb

Copy link
Copy Markdown
Author

Note on the failing CLA check: GitGuardian has passed, and the failing job is only CLAAssistant.

This looks like the same repository-side CLA Assistant infrastructure issue currently affecting the other Etherisc PRs: the CLA job itself fails, while the code/security check is green. Could a maintainer please rerun/fix the CLA Assistant token or advise how you want contributor CLA handled here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Unstake button double click

2 participants