Release: develop -> main#4351
Merged
Merged
Conversation
* feat(fiat-output): track Scrypt deposit notifications with retry The Scrypt deposit request for completed LiqManagement payouts was sent fire-and-forget from the outgoing bank tx match: a send failure was lost forever and manual admin completion bypassed the notification entirely. Replace the inline call with a state-driven sweep over completed, unnotified payouts (new fiat_output.scryptDepositNotifiedDate column). The sweep only marks a payout as notified once the deposit is visible in the balance transaction cache and re-sends the request hourly while unconfirmed, with a stable ClReqID across retries. Rejected or failed deposits keep alerting via error log instead of being marked. Existing completed payouts are backfilled in the migration so the sweep only covers new completions. * fix(fiat-output): throttle rejected Scrypt deposit alerts and harden migration test Review follow-ups: throttle the rejected/failed alert branch through the existing attempt map so a permanently rejected deposit alerts hourly instead of every minute (deliberately kept in the sweep so it stays visible until resolved), document the in-memory pacing and stable ClReqID idempotency assumption, and extend the migration spec with an entity metadata alignment check plus a real-database up/down test covering the backfill predicate. * fix(fiat-output): separate send and alert pacing for Scrypt deposit sweep A fresh send attempt stamped the shared pacing map and could delay the first rejected/failed alert by up to one retry interval. Track send attempts and alerts in separate maps so a rejection arriving right after a send alerts immediately, clear both entries once a deposit is confirmed, and cover the send-then-reject sequence with a dedicated test. * fix(fiat-output): mark Scrypt deposits only on completed status and retry failed sends The sweep marked any cached status other than rejected/failed as notified, so an intermediate status such as PendingApproval would silently end tracking and a later rejection would never alert. Mark only on Completed and wait on any other status. Also stamp the send pacing map only after a successful send so a failed send is retried on the next sweep instead of after an hour, and extend the fail-closed guard to mirror the full sweep predicate (isComplete, not yet notified). Covered by four new tests plus two additional guard cases.
github-actions
Bot
requested review from
TaprootFreak and
davidleomay
as code owners
July 24, 2026 06:59
* Add RealUnit as an OpenCryptoPay payment-link wallet Register RealUnit in the wallet_app catalog so it is offered on payment-link pages. It behaves like the AQUA wallet: Lightning-category, bare custom-scheme deepLink (realunit-wallet:), no asset restriction (assets NULL) — the ZCHF settlement happens inside the app and is invisible to the backend matching. Idempotent SELECT-then-skip guard against the UNIQUE(name) constraint, matching the existing migration convention. * Correct RealUnit classification to ZCHF on Ethereum RealUnit does not support Lightning — it consumes the OpenCryptoPay LNURL only as the payment-request identifier and settles on-chain in ZCHF on Ethereum. Set blockchains='Ethereum' and assets='251' (Ethereum/ZCHF) so it qualifies for the Ethereum/ZCHF transfer option of an OCP payment, instead of the incorrect Lightning classification. * Resolve the ZCHF asset id by uniqueName in the RealUnit migration Asset ids are environment-specific and wallet_app.assets has no FK, so a hardcoded id can silently point at the wrong (or no) asset in another environment — marking RealUnit inactive with no error. Resolve the Ethereum/ZCHF asset by its stable uniqueName at migration time and fail loud if it is missing, matching the sibling migrations that touch the same asset.
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