Skip to content

Release: develop -> main#3681

Merged
davidleomay merged 7 commits into
mainfrom
develop
May 11, 2026
Merged

Release: develop -> main#3681
davidleomay merged 7 commits into
mainfrom
develop

Conversation

@github-actions
Copy link
Copy Markdown

@github-actions github-actions Bot commented May 7, 2026

Automatic Release PR

This PR was automatically created after changes were pushed to develop.

Commits: 1 new commit(s)

Checklist

  • Review all changes
  • Verify CI passes
  • Approve and merge when ready for production

…k batch completion (#3680)

* fix: stop buy-crypto transactions for blocked/deleted users to unblock batch completion

When a user is deleted or blocked after their transaction enters a
payout batch, the batch gets permanently stuck in PayingOut status.
The blocked user check throws an error that is caught and silently
continued, but the transaction never receives a payout order and can
never complete. Since batch completion requires ALL transactions to
have isComplete=true, one stuck transaction blocks the entire batch
indefinitely. The per-asset batch lock then prevents any new batches
for the same output asset from being created.

Changes:
- Add stop() method to BuyCrypto entity (sets STOPPED + isComplete)
- In payoutTransactions(): stop blocked/deleted user transactions
  instead of throwing, preventing the dead-end from being created
- In checkCompletion(): detect and stop blocked/deleted user
  transactions to unblock existing stuck batches

* fix: do not set isComplete for stopped transactions, fix batch completion check

isComplete should only be true when the payout is confirmed on-chain.
The batch completion check now also accepts STOPPED transactions,
so stopped transactions no longer block batch progression.

* refactor: use entity stop() method in transaction service for consistency

The existing manual stop in transaction.service.ts set the status
directly instead of using the entity method pattern. Use the new
stop() method for a single source of truth.

* fix: set amlCheck to Fail for blocked/deleted users to trigger chargeback

When a user is blocked or deleted, the money must be returned via the
existing chargeback process. Set amlCheck=Fail with the appropriate
AmlReason (USER_BLOCKED, USER_DATA_BLOCKED, or USER_DELETED).

Buy-crypto: stop() now accepts optional amlReason parameter.
Fiat-output: set amlCheck=Fail on linked BuyFiat entities for blocked
users instead of throwing, triggering the sell-crypto chargeback flow.

* test: add BuyFiatRepository mock to fiat-output-job test module

* fix: use UserStatus enum instead of string literal, consistent reason in fiat-output
TaprootFreak
TaprootFreak previously approved these changes May 7, 2026
davidleomay
davidleomay previously approved these changes May 7, 2026
* feat: custody equity methods

* fix: format

* chore: refactoring

* chore: more refactoring

* chore: cleanup

* fix: format

* chore: PR review

* chore: refactoring
@davidleomay davidleomay dismissed stale reviews from TaprootFreak and themself via 87823b9 May 7, 2026 14:14
davidleomay and others added 5 commits May 7, 2026 18:34
* feat: fixed balance check + calculation, added order history API

* fix: format

* fix: required user role

* feat: improved rounding

* chore: after merge fixes
* fix: add missing fee and amount fallbacks

* fix: store asset for receive
* feat: added rounding

* fix: load relations

* fix: format

* fix: add from address

* chore: cleanup
* [NOTASK] Fix onboarding pdf file bug

* [NOTASK] Refactoring
@davidleomay davidleomay merged commit f8363d9 into main May 11, 2026
11 checks passed
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.

3 participants