Skip to content

fix: show receive details button when node starting#1090

Open
jvsena42 wants to merge 5 commits into
masterfrom
fix/details-button-visibility-when-node-initializing
Open

fix: show receive details button when node starting#1090
jvsena42 wants to merge 5 commits into
masterfrom
fix/details-button-visibility-when-node-initializing

Conversation

@jvsena42

@jvsena42 jvsena42 commented Jul 16, 2026

Copy link
Copy Markdown
Member

This PR makes the Show Details button on the Receive screen available while the Lightning node is still starting up, so the on-chain address can be viewed and copied right away.

Description

  • Removes the node-lifecycle guard that hid the entire Receive bottom button whenever the node was not exactly running, which also hid it during startup on the Savings tab.
  • Keeps the Savings tab usable while the node boots: its address and payment request come from the local cache and never needed the node in the first place.
  • Leaves the CJIT button behaviour unchanged, since that variant already depends on its own running-node condition and cannot appear while the node is down.

Preview

with-spending.webm
only-savings.webm

QA Notes

Manual Tests

  • 1. Force-stop app → relaunch with existing wallet → open Receive before node finishes starting → Savings: Show Details button is visible.
  • 2a. Node still starting → Savings → tap Show Details: on-chain address and payment request are shown and can be copied.
    • 2b. tap Show QR: returns to the QR view.
  • 3. Node still starting → Savings → scan the QR from another wallet: the on-chain address resolves and is payable.
  • 4. Node still starting → swipe to Spending: CJIT button does not appear until the node is running.
  • 5a. regression: Node running → Savings → tap Show Details: unchanged, shows the address.
    • 5b. regression: Node running, no usable channels → Spending: CJIT button still appears.
    • 5c. regression: Node running, usable channels → Auto and Spending → tap Show Details: still show the LN payment request.

Automated Checks

  • No automated coverage changed: the fix removes a Compose visibility wrapper with no logic underneath it, and the invoice-selection helper it sits next to is untouched and already covered by ReceiveInvoiceUtilsTest.kt.
  • The existing not-ready preview in the Receive QR screen already renders the screen mid-startup and now shows the button, so the change is verifiable from Android Studio previews.
  • Local: just compile, just test, just lint.
  • CI: standard compile, unit test, and detekt checks run by the PR bot.

@jvsena42 jvsena42 added this to the 2.5.0 milestone Jul 16, 2026
@jvsena42 jvsena42 self-assigned this Jul 16, 2026
@jvsena42
jvsena42 marked this pull request as ready for review July 16, 2026 16:47
@jvsena42
jvsena42 requested a review from piotr-iohk July 16, 2026 16:48
@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR makes Receive details available while the Lightning node starts. The main changes are:

  • Removes the running-node visibility wrapper from the bottom action.
  • Adds a loading indicator when Spending details have no invoice.
  • Adds a preview for the Spending loading state.
  • Documents the Receive screen change.

Confidence Score: 4/5

Unavailable-node Spending details can show stale invoice data or remain on an endless spinner.

  • Stopping the node retains the previous Lightning invoice while details remain reachable.
  • Stopped and failed startup states render loading even though no invoice can arrive.
  • The new component import and preview match existing Compose APIs.

app/src/main/java/to/bitkit/ui/screens/wallets/receive/ReceiveQrScreen.kt

Important Files Changed

Filename Overview
app/src/main/java/to/bitkit/ui/screens/wallets/receive/ReceiveQrScreen.kt Exposes Receive actions before the node is running and adds a fallback loading state for missing Spending invoices.
changelog.d/next/1090.fixed.md Documents that on-chain Receive details are available while the Lightning node starts.

Reviews (1): Last reviewed commit: "fix: remove node running gate for displa..." | Re-trigger Greptile

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