Release: develop -> main#3915
Merged
Merged
Conversation
* 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.
…06-18 as invalid (#3916)
TaprootFreak
approved these changes
Jun 18, 2026
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.
Automatic Release PR
This PR was automatically created after changes were pushed to develop.
Commits: 1 new commit(s)
Checklist