Skip to content

fix(bank): attribute Bank Frick CHF bank-to-Scrypt transfers in the reconciliation#4257

Merged
TaprootFreak merged 2 commits into
developfrom
feat/frick-chf-scrypt
Jul 18, 2026
Merged

fix(bank): attribute Bank Frick CHF bank-to-Scrypt transfers in the reconciliation#4257
TaprootFreak merged 2 commits into
developfrom
feat/frick-chf-scrypt

Conversation

@TaprootFreak

Copy link
Copy Markdown
Collaborator

What

Follow-up to #4252, which fixed the EUR side of the log-job Scrypt reconciliation for Bank Frick.
This does the same on the CHF side.

The CHF Scrypt-reconciliation bank_tx filters hardcoded the Yapeal CHF IBAN, so a Bank Frick CHF
bank_tx into or out of Scrypt was dropped from the pending computation (Bank Frick CHF is a
newly-active fallback account).

Changes

  • Widen the two CHF Scrypt bank_tx filters (chfSenderScryptBankTx, chfReceiverScryptBankTx) to
    include the Bank Frick CHF IBAN, so a Frick CHF bank→Scrypt transfer attributes to the Frick/CHF
    asset, and a Frick CHF credit can settle a previously-unmatched pending withdrawal.
  • Tests: Yapeal/CHF pending stays bit-identical with no Frick activity; a Frick CHF bank→Scrypt
    transfer attributes to Frick/CHF (not Yapeal), with no double-count.

Scope / safety

  • Yapeal CHF is bit-identical when there is no Frick CHF activity (includes reduces to the prior
    equality); each bank_tx attributes to exactly one asset (per-row IBAN match via
    isBankMatching), so there is no double-count.
  • The Scrypt→Bank attribution target is deliberately left hardcoded to the Yapeal CHF IBAN. An
    exchange-tx (Scrypt withdrawal) carries no field identifying the destination bank, so making that
    target per-asset would tautologically match every CHF bank asset and double-count the same
    withdrawal. Leaving it keeps the total counted exactly once — the per-bank split of an unmatched
    pending CHF Scrypt withdrawal is a pre-existing, transient limitation, not a regression.

Note

Stacked on #4252 (base feat/frick-asset-wiring); retarget to develop once #4252 merges.

@TaprootFreak

Copy link
Copy Markdown
Collaborator Author

Reviewed for correctness/equity-safety and conformance. The correctness pass confirmed — via direct code tracing and a fix-reverted control test run — that the implemented Bank->Scrypt direction cannot double-count and leaves Yapeal CHF bit-identical, and that the Scrypt->Bank attribution is correctly left unchanged (an exchange-tx carries no destination-bank field, so a per-currency target would double-count the same withdrawal). The one conformance finding (a comment-clarity ambiguity) was fixed. Note: this PR is stacked on #4252 — for a feature-base PR GitHub runs only the review check; the full build/test suite runs automatically once #4252 merges and this PR retargets to develop. Merge after #4252.

@TaprootFreak
TaprootFreak marked this pull request as ready for review July 17, 2026 16:05
Base automatically changed from feat/frick-asset-wiring to develop July 17, 2026 20:55
…econciliation

Symmetric to the EUR fix: the CHF side of the log-job Scrypt reconciliation
hardcoded the Yapeal CHF IBAN, so a Bank Frick CHF bank_tx into or out of Scrypt
was dropped from the pending computation (Bank Frick CHF is a newly-active
fallback account).

Widen the two CHF Scrypt bank_tx filters to include the Bank Frick CHF IBAN, so
a Frick CHF bank-to-Scrypt transfer attributes to the Frick/CHF asset and a Frick
CHF credit can settle a previously-unmatched pending withdrawal. Yapeal CHF stays
bit-identical when there is no Frick activity, and each bank_tx attributes to
exactly one asset (per-row IBAN match), so there is no double-count.

The Scrypt-withdrawal attribution target is deliberately left hardcoded to the
Yapeal CHF IBAN: an exchange-tx carries no field identifying the destination
bank, so making that target per-asset would tautologically match every CHF bank
asset and double-count the same withdrawal. Leaving it keeps the total counted
exactly once.
@TaprootFreak
TaprootFreak force-pushed the feat/frick-chf-scrypt branch from c46f42b to 8d95206 Compare July 17, 2026 21:17
@TaprootFreak
TaprootFreak merged commit 3f235b3 into develop Jul 18, 2026
7 checks passed
@TaprootFreak
TaprootFreak deleted the feat/frick-chf-scrypt branch July 18, 2026 17:05
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