Repository navigation
Stop the association monitor flagging each client's own refund wallet - #1412
Merged
Merged
Conversation
Onboarding links each client's derived refund wallet to the client's Monerium profile, but the association monitor treated every address other than the forwarder as unexpected. Every active account therefore raised an error-level ASSOCIATION CHANGE (the S1 incident alert) on every monitoring pass. The monitor now derives the same refund wallet onboarding links (refundAccountFor(profileId)) and excuses exactly that address. Any other extra address still alerts, as do the forwarder unlinked and the IBAN moved or unrecorded checks. If the refund seed is missing nothing is excused, so the check fails loud instead of going quiet.
✅ Deploy Preview for vortexfi canceled.
|
✅ Deploy Preview for vrtx-dashboard canceled.
|
✅ Deploy Preview for vortex-sandbox ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ebma
marked this pull request as draft
October 8, 2026 15:27
ebma
marked this pull request as ready for review
October 8, 2026 15:27
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.
Why
The association monitor (the S1 detective control) error-alerts on any address linked to a client's Monerium profile other than the forwarder. Since per-client refund wallets landed, onboarding deliberately links each client's derived refund wallet to the same profile, so every active account raises a false
ASSOCIATION CHANGEincident alert on every monitoring pass. Seen live in the local sandbox rehearsal: "unexpected address linked to the profile: <the client's refund wallet>".What changes
diffAssociationalso accepts the client's derived refund wallet (refundAccountFor(account.profileId), the same derivation onboarding uses) as an expected linked address. Every other extra address still alerts, and the IBAN moving to the refund wallet still reports "moved".Not added: an alert when the refund wallet is not linked. Onboarding links it before requesting the IBAN, but nothing enforces it beyond that ordering, and it is not an S1 divergence. Easy to add as a separate message if wanted.
No route, payload or schema change; wire-contract check clean.
Tests
monitoring.test.ts: the refund wallet linked (any case) reports nothing; a third unknown address still reports exactly one change; without a refund address the wallet is reported; the IBAN moving to the refund wallet is still reported. Both new tests fail againststaging'smonitoring.ts(28 pass, 2 fail).bun test src/api/services/monerium-b2b src/api/workers: 217 pass. Typecheck,bun run verifyandwire-contract:checkclean.runAssociationMonitor's wiring is not unit-tested (it needs RPC, DB and the Monerium client). The false alert shows on every pass in the local sandbox rehearsal. Re-checked live: with this branch merged into the local rehearsal stack (with Let the partner register a client's destination and onboard it automatically #1408, Fix the refund retry cap and a reverse swap skipped on a lagging read #1410 and Run B2B refunds one at a time per client instead of globally #1411), the monitoring pass no longer reports the refund wallet and logs no association-monitor failure.