Conversation
…ings (#4245) * feat(scorechain): add compliance endpoint listing a customer's screenings Add GET /support/:id/scorechain (COMPLIANCE/DEBUG, ApiExcludeEndpoint) returning all persisted Scorechain screenings for a userData as ScorechainScreeningDto[]. It derives each of the user's tx screening keys (blockchain:objectId) exactly as the AML gate does and returns only the rows the user actually produced, without ever re-running or billing a screening. - ScorechainScreeningDto + mapper: parsed riskIndicatorData/rawResponseData via the entity getters, plus isHighRisk and the related buyCrypto/buyFiat ids for deep-linking - ScorechainScreeningService.getByObjectIds + repository finder (In(), created DESC, no DB hit on empty input) - SupportService.getScorechainScreenings correlates screenings by objectId over the user's transactions (null-safe target-address resolution so an unscreenable tx cannot 500 the list) - Centralize the ScorechainAnalysis* shapes in scorechain.dto.ts * style(scorechain): apply prettier formatting to support.service.ts * refactor(scorechain): drop the unnecessary intermediate variable in the DTO mapper * refactor(scorechain): move the screening DTO mapper into its own *-dto.mapper.ts
github-actions
Bot
requested review from
TaprootFreak and
davidleomay
as code owners
July 16, 2026 20:31
…ening namespace against retry re-opens (#4253) * fix(accounting): resolve cutover fiat marks through the currency's bank asset openBuyFiatOwed looked a Fiat id up in the asset-keyed mark cache (fiat 2 = EUR, asset 2 = DeFiChain/dBTC), so every foreign-currency owed opening missed its mark and aborted the cutover. Resolve the mark through the currency's representative tracked-bank asset instead — the same value the forward consumers book — and let bankMark fall back to it for untracked or unmatched banks, which would otherwise wedge the aggregated unattributed opening. The three per-row buy_fiat opening namespaces are now mutually exclusive across retries: their routing (outputAmount/fiatOutput) is mutable and re-evaluated on every fail-loud retry while the snapshot stays pinned, so a row that moved bucket between runs got a second opening under the new sourceId and silently double-counted equity. Both directions are real paths, so the guard checks all three namespaces before booking. Also drop the claim that a failed run rolls the cutover back: per-row openings commit in their own transactions and stay committed. * fix(accounting): guard every source-row opening namespace against retry re-opens The buy_crypto path carries the same defect as buy_fiat: :buy_crypto: and :buy_crypto-owed: are disjoint sourceId namespaces routed by the mutable outputAmount, so a row that moves bucket between two fail-loud retries gets a second opening. There it is worse than a plain double-count — the forward consumer skips seq0 and seq1 once an owed opening exists, leaving the received opening permanently unclosed. Generalise the guard over a namespace list and run it at the top of all four loops, so an already-opened row is never re-pinned as unpriced either. Also correct the rationale comments: the cutover routes on outputAmount and cryptoInput.paymentLinkPayment, never on fiatOutput, and the method that clears outputAmount is resetAmlCheck, not resetSendingInfo. * fix(accounting): align the remaining fail-loud rationale with the code Three sibling comments still claimed a missing mark rolls the cutover back — the same false claim this branch already corrected on bookReceivedOwedOpening, and the one that let the double-open gap go unnoticed. They also named a no-bank-match as the miss condition, which the currency fallback now resolves. * fix(accounting): state the real miss condition and consequence for a missing bank mark The unattributed aggregate does not defer an unvaluable credit to mark-to-market — it throws, and the CHF liability bucket it would have written is never revalued. The miss condition also kept a live disjunct: a tracked bank whose asset carries no mark at the snapshot date resolves no mark either, and that branch has no currency fallback, mirroring the forward consumer.
TaprootFreak
approved these changes
Jul 17, 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