Skip to content

Release: develop -> main#4351

Merged
TaprootFreak merged 2 commits into
mainfrom
develop
Jul 24, 2026
Merged

Release: develop -> main#4351
TaprootFreak merged 2 commits into
mainfrom
develop

Conversation

@github-actions

Copy link
Copy Markdown

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

* 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.
* 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.
@TaprootFreak
TaprootFreak merged commit 685a016 into main Jul 24, 2026
12 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