Skip to content

feat: compliance improvements (limit request, stop transaction, chargeback)#1048

Merged
bernd2022 merged 10 commits intodevelopfrom
feature/compliance-improvements
Apr 16, 2026
Merged

feat: compliance improvements (limit request, stop transaction, chargeback)#1048
bernd2022 merged 10 commits intodevelopfrom
feature/compliance-improvements

Conversation

@bernd2022
Copy link
Copy Markdown
Collaborator

Summary

  • Onboarding cleanup (9080619, 06e78f1): remove the "Login Kundenkonto" row from the onboarding header and use fixed positioning for the modal overlay.
  • Limit Request UI (5b6c089, 19244f6, 9a8f301): add createLimitRequest to the compliance hook, extract LimitRequestFields for reuse, and add a "Limit Request" button in compliance onboarding.
  • Stop transaction button (a4d112d): add a stop-transaction button with confirm dialog in the compliance transactions tab, calling the new POST /transaction/admin/:id/stop endpoint.
  • Chargeback flow (88950a0): add a chargeback modal in the compliance transactions tab that calls PUT /support/transaction/:id/chargeback to release a refund. Extract reusable refund components (creditor fields, data table) and refactor compliance-bank-tx-return to use them. Add the new STOPPED payment state label and a getSupportUserInfo hook.
  • Package bump (4d8a711): bump @dfx.swiss/react and @dfx.swiss/react-components to 1.3.0-beta.268 (includes the new TransactionState.STOPPED).

Companion PRs

Test plan

  • npm run lint
  • npm test ✅ (26 suites, 276 tests passing)
  • Manual: open compliance transactions tab → "Stop transaction" button shows confirm dialog and on confirm marks the transaction as Stopped.
  • Manual: open compliance transactions tab → "Chargeback" modal allows entering creditor data and submits to the chargeback endpoint for BuyCrypto, BuyFiat and unassigned BankTx.
  • Manual: compliance onboarding → "Limit Request" button creates a support issue routed to COMPLIANCE.
  • Manual: bank-tx-return screen still works after refactor (uses extracted refund components).

The modal was positioned absolute inside the scroll container, causing
it to appear at the top of the scroll area rather than the visible
viewport. Switch to fixed + overflow-y-auto so the modal always stays
in the viewport regardless of scroll position.
Move the Limit Request form fields (Name, Limit, Investment Date,
Fund Origin, Message, File) into a dedicated component so the same
UI can be reused in the compliance flow without duplication.
Compliance users can now create a Limit Request on behalf of a user
directly from the onboarding review (depositLimit row) and from the
user data panel. The modal reuses the shared LimitRequestFields
component so any future changes to the form apply to both the user
and compliance flows.
Introduce a chargeback modal in the compliance transactions tab that
calls the new PUT /support/transaction/:id/chargeback endpoint to
release a refund. Extract reusable refund components (creditor fields
and data table) and refactor the bank-tx-return screen to use them.
Add STOPPED to the payment state labels and a getSupportUserInfo hook.
Comment thread src/components/refund/refund-creditor-fields.tsx Fixed
@bernd2022 bernd2022 requested a review from davidleomay April 15, 2026 08:07
- Remove getSupportUserInfo and BankRefundData (no longer needed)
- Update chargeback URL from /chargeback to /refund
- Migrate bank-tx-return screen to use chargebackTransaction with nested creditorData
Copy link
Copy Markdown
Member

@davidleomay davidleomay left a comment

Choose a reason for hiding this comment

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

  • Fix code quality comment

@bernd2022 bernd2022 marked this pull request as ready for review April 16, 2026 17:03
@bernd2022 bernd2022 requested a review from TaprootFreak as a code owner April 16, 2026 17:03
@bernd2022 bernd2022 merged commit 297220c into develop Apr 16, 2026
6 checks passed
@bernd2022 bernd2022 deleted the feature/compliance-improvements branch April 16, 2026 17:20
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.

2 participants