Skip to content

feat(settlement-detail): add pending state to prevent concurrent actions#386

Open
dominiccreates wants to merge 1 commit into
AnchorNet-Org:mainfrom
dominiccreates:pending-settlement-action
Open

feat(settlement-detail): add pending state to prevent concurrent actions#386
dominiccreates wants to merge 1 commit into
AnchorNet-Org:mainfrom
dominiccreates:pending-settlement-action

Conversation

@dominiccreates

Copy link
Copy Markdown

Closes #132 This PR adds a pending boolean state to src/components/SettlementDetail.tsx to disable Execute and Cancel buttons while an action is in flight, preventing duplicate requests. Updated the run helper to set/clear pending, added disabled={pending} to both buttons, and introduced tests verifying the disabled behavior. Also fixed wallet utilities to safely handle missing localStorage in test environments and adjusted test setup with an in‑memory localStorage shim. All tests now pass (498 total, 95% coverage).

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.

Disable Execute/Cancel buttons in SettlementDetail while a request is in flight

1 participant