Skip to content

Conversation

@github-actions
Copy link

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

* Add migration to sync transaction AML data for affected buy_crypto records

Fix data synchronization issue where transaction.amlCheck remains NULL
while buy_crypto.amlCheck is 'Pass'. This occurred because transactions
could be batched and completed before their AML check passed.

Related: #3086

* Improve migration with NULL validation and safe rollback

- Add check for incomplete source data (NULL inputReferenceAsset or outputAssetId)
- Skip transactions with incomplete data and log warning
- Add inputReferenceAsset IS NOT NULL to WHERE clause
- Change down migration to no-op (rolling back would return data to incorrect state)
- Improve logging with asset details

* Add reset for Fail/Pass mismatch transactions

Extends migration to also fix transactions where bc.amlCheck='Fail'
but t.amlCheck='Pass' (11 records, ~127k CHF). These fields are
reset to NULL to match standard behavior when amlCheck is not Pass.

* Add BuyFiat support to transaction AML data sync migration

- Add Part 2 for BuyFiat transactions (outputAsset -> fiat table)
- BuyFiat uses fiat table for outputAsset, not asset table
- Affected: 1 BuyFiat record (371 CHF, ETH-CHF)

* Extend migration to fix all Pass cases (NULL and Fail)

* Update JSDoc: 13 BuyCrypto records (incl. 3 Fail)

* Add Parts 3-4: Reset Fail/Pass mismatches (chargebacks/blocks)

* Add Part 5: Reset BuyFiat ManualStop/Pass mismatches (115 records)
@TaprootFreak TaprootFreak merged commit d27751e into main Jan 31, 2026
7 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