Skip to content

Release: develop -> main#3915

Merged
TaprootFreak merged 2 commits into
mainfrom
develop
Jun 18, 2026
Merged

Release: develop -> main#3915
TaprootFreak merged 2 commits into
mainfrom
develop

Conversation

@github-actions

Copy link
Copy Markdown

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

* fix(buy-crypto): complete bank chargebacks from chargebackOutput

Bank-based BuyCrypto chargebacks were never marked complete: chargebackFillUp
re-matched the outgoing bankTx via getBankTxByRemittanceInfo, which regularly
failed, leaving isComplete=false. Such orders kept counting as a pending
liability (pendingInputAmount), permanently depressing the financial-data-log
total balance.

Complete the order deterministically once its chargebackOutput (FiatOutput) is
executed, taking chargebackBankTx from chargebackOutput.bankTx. The bankTx type
is already set to BUY_CRYPTO_RETURN by fiat-output-job.setBankTxType, so the
fragile remittance re-match is removed. Adds unit tests.

* test(buy-crypto): cover chargebackFillUp webhook-failure resilience

Add a multi-entity test asserting the per-entity try/catch lets the loop
continue completing remaining orders when triggerWebhook rejects for one.

* test(buy-crypto): sort imports, assert chargebackOutput.bankTx relation is loaded

* test(buy-crypto): make chargebackFillUp query-guard structure-agnostic

Rename the guard test to its honest scope and assert FindOperator instances
instead of TypeORM-internal shapes, decoupling from typeorm internals.

* test(buy-crypto): assert filter operator direction and model real stuck chargeback

Check FindOperator .type (isNull / not) so an inverted-operator regression
fails, and set outputAmount: null in fixtures to mirror a real AML-failed,
not-paid-out chargeback.

* fix(buy-crypto): load cryptoInput relation in chargebackFillUp

triggerWebhook reads cryptoInput; load it explicitly so webhook correctness
does not implicitly depend on the query filter.

* test(buy-crypto): assert inner Not(IsNull()) operator and clarify fixture comment

Verify the nested IsNull via FindOperator.child so an inverted inner operator
fails, and neutralize the misleading outputAmount comment.

* fix(buy-crypto): load bankTx relation for complete chargeback webhook payload

triggerWebhook reads bankTx.iban as sourceAccount; load it alongside
cryptoInput so the completion webhook payload is complete.
@TaprootFreak TaprootFreak merged commit 36d151c into main Jun 18, 2026
12 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.

1 participant