2ac46f80 - Add resume button for stopped transactions in the compliance transactions tab - #1254
Merged
Merged
Conversation
Collaborator
Author
|
Three review passes were needed. What changed along the way:
One point both review dimensions raised is tracked in #1256 instead of being fixed here: the action POST and the follow-up detail refresh share a try block, so a failing refresh reports a successful action as "Resume failed". That is unchanged pre-existing behaviour of the stop flow which this change mirrors for consistency, and a repeated resume click is rejected by the backend guard — the impact is a misleading message, not a duplicate action. Verified locally on every push: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a Resume button next to the existing Stop button in the compliance transactions tab. It calls the new backend endpoint
POST /transaction/admin/:id/resume(DFXswiss/api#4625) and puts a stopped buy-crypto back into automated processing.Behaviour
StoppedChanges
compliance.hook.ts: newresumeTransaction(transactionId)transactions-tab.tsx: resume state/handler/button/dialog, mirroring the stop flowonStoppedrenamed toonStatusChanged(it now fires after stop, resume and chargeback)e2e/compliance.spec.ts: new visual test covering the resume button and its confirmation dialog, plus the two baselines (the test cancels the dialog, so it never mutates server state). It needs a local buy-crypto with statusStopped/amlCheckPass— the standard test data has none, see the comment aboveTEST_STOPPED_TX_UID.e2e/test-wallet.ts: EVM credentials now fetch the sign message fromGET /v1/auth/signMessageinstead of hardcoding it. The API prefixes that message outside production ([loc]_…), so the hardcoded text made every e2e run fail admin auth with 401 — unrelated to this feature, but it blocks regenerating any baseline.Follow-up
Two robustness gaps that this flow inherits from the existing stop flow are tracked in #1256 (not introduced here).
Depends on
DFXswiss/api#4625 — without the backend endpoint the button returns 404.