Skip to content

feat(zap): move instant-zap config into the zap sheet's Edit Presets#399

Open
dmnyc wants to merge 1 commit into
mainfrom
feat/instant-zap-in-sheet
Open

feat(zap): move instant-zap config into the zap sheet's Edit Presets#399
dmnyc wants to merge 1 commit into
mainfrom
feat/instant-zap-in-sheet

Conversation

@dmnyc

@dmnyc dmnyc commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Instant-zap setup was buried in Settings → Interface, easy to miss. Move it into the zap sheet — where it's actually used.

  • ZapSheet instant-zap row — when enabled, shows the configured amount + message and a "configure in Presets" caption; the bolt icon tints accent when on.
  • EditPresetsSheet — adds an "Instant zaps" toggle ("Instant payments" in fiat mode) with the caption "Long-press the bolt to send the selected preset instantly," plus a per-preset leading selector (checkmark.circle.fill / circle) enabled only while the toggle is on. Done persists quickZapEnabled + the selected preset's amount (clamped 1–10,000 sats) and message. Deleting the selected row reselects the first.
  • InterfaceSettingsView — the instant-zap block is removed. The Currency (fiat mode) section is untouched.

Fiat mode is unaffected — it stays in Settings as an app-wide units toggle. Default stays off; long-press instant zap fires the configured amount, unchanged.

Scope notes

  • The amount hint in the sheet shows sats even in fiat mode (matches the Android reference).
  • Presets are sats-based, so Edit Presets only sets the sats instant amount. In fiat mode an instant zap still fires the last-saved fiat value (quickZapAmountFiat), which is no longer editable in this UI. Fiat-mode instant-zap handling will be addressed in a follow-up — out of scope here.
  • Instant-zap settings remain device-local, per account. NIP-78 cross-device sync stays deferred — tracked in Persist user settings with NIP-78 #70.

Screenshots

Zap sheet — instant row Edit Presets — selection Settings — block removed
image image image
Instant-zaps toggle shows amount + message + "configure in Presets" Leading selector picks the instant preset Interface settings no longer has the instant-zap block

Test plan

  • Build succeeds, installed and ran on simulator
  • Zap sheet: instant-zaps toggle shows amount + message + "configure in Presets" when on; bolt tints accent
  • Edit Presets: toggle + per-row selection; Done persists enabled + selected preset's amount & message; the sheet reflects it
  • Deleting the selected preset row reselects the first row
  • Settings → Interface: instant-zap block gone; Fiat mode intact
  • Long-press a post's zap button fires the configured instant amount
  • Default off on a fresh account; switching accounts swaps presets + instant selection

Follow-up

  • Fiat-mode instant zaps — let Edit Presets set the fiat instant amount too (or derive it from the selected preset), so fiat users aren't stuck on the last-saved value. Deferred to a follow-up.
  • Android design parity — spec written to align dark-wisp / wisp-Android with this layout (leading selector, cleaner header, airier rows); ported separately.

Instant-zap setup was buried in Settings → Interface. Relocate it to the
zap sheet where it's used, matching the Android layout:

- ZapSheet instantZapRow now shows the configured amount + message and a
  "configure in Presets" caption when enabled; the bolt tints accent when on.
- EditPresetsSheet gains an "Instant zaps" toggle and a per-preset leading
  selector (checkmark.circle.fill / circle) enabled only when the toggle is
  on. Done persists quickZapEnabled + the selected preset's amount (clamped
  1–10,000 sats) and message. Deleting the selected row reselects the first.
- Remove the instant-zap block from InterfaceSettingsView; the Currency
  (fiat mode) section is unaffected.

Instant-zap settings remain device-local per account; NIP-78 cross-device
sync stays deferred (#70).
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