Skip to content

Comments

feat: peer cards with labels + use ldk-node from GH#800

Merged
ovitrif merged 6 commits intorelease/177-hotfixfrom
release/177-hotfix-update
Feb 23, 2026
Merged

feat: peer cards with labels + use ldk-node from GH#800
ovitrif merged 6 commits intorelease/177-hotfixfrom
release/177-hotfix-update

Conversation

@ovitrif
Copy link
Collaborator

@ovitrif ovitrif commented Feb 23, 2026

Fix #682

This PR:

  1. Define NodePeer data model to enrich known peers with names
  2. Adds peer cards with labels on the node info screen
  3. Shows all node info by default, regardless of dev mode on/off value (iOS parity)
  4. Consumes ldk-node-android dependency GitHub Packages instead of JitPack
  5. Updates detekt config for magic numbers to include common design tokens values
  6. Updates AI rules for view model file conventions
  7. Add padding between ldk debug screen peer input and buttons
  8. Bumps app version

Description

Polishes peer card UI and makes Node Info screen show all details from the start. Introduces a dedicated NodeInfoViewModel and NodePeer model, and sources peer labels from Env configuration if fetching from LSP API fails.

Also switches the ldk-node-android dependency from JitPack to GitHub Packages, and includes minor housekeeping for detekt and AI rules.

Preview

peerCards

QA Notes

1. Peer cards visibility

  1. Build and run a dev debug build
  2. Navigate to the Node Info screen
  3. Verify peer cards display with labels (e.g. LSP, LND nodes)
  4. Confirm cards show peer alias, public key, and disconnect button
  5. Tap on a card → expect to see copy toast
  6. Tap on disconnect → expect peer to disconnect (it should reconnect on node restart)

- define NodePeer data model to enrich known peers with names
- use card UI for peers listed in node dev screen
- show all node details regardless of dev mode on or off
- extract node dev screen viewmodel
- define NodePeer data model to enrich known peers with names
- use card UI for peers listed in node dev screen
- show all node details regardless of dev mode on or off
- extract node dev screen viewmodel
- add padding between ldk debug screen peer input and buttons
@ovitrif ovitrif changed the title feat: peer cards with labels feat: peer cards with labels + use ldk-node from GH Feb 23, 2026
@ovitrif ovitrif self-assigned this Feb 23, 2026
@piotr-iohk
Copy link
Collaborator

I made regtest build from this branch and tried to transfer to savings (having 1BTC onchain), but seeing "Available 0" on transfer to spending screen. Setting any amount larger than 0 makes "Continue" button inactive:

Screen.Recording.2026-02-23.at.16.18.26.mov

in the log there is:

2026-02-23 15:09:49.289 ERROR   [ldk_node::wallet:1150]              Selected UTXOs have insufficient value. Have: 100000000sats, Need at least: 100001000sats
2026-02-23 15:09:49.293 VERBOSE [DeriveBalanceStateUseCase.kt:53]    Balances in state at block height=71625: {"totalOnchainSats":100000000,"totalLightningSats":0,"maxSendLightningSats":0,"maxSendOnchainSats":99999890,"balanceInTransferToSavings":0,"balanceInTransferToSpending":0}
2026-02-23 15:09:59.114 ERROR   [ldk_node::wallet:1150]              Selected UTXOs have insufficient value. Have: 100000000sats, Need at least: 100001000sats
2026-02-23 15:10:08.698 ERROR   [ldk_node::wallet:1150]              Selected UTXOs have insufficient value. Have: 100000000sats, Need at least: 100001000sats
2026-02-23 15:10:12.348 INFO    [BlocktankRepo.kt:258]               Estimating order fee for spendingSats=99999890, receivingSats=2499997
2026-02-23 15:10:13.545 DEBUG   [BlocktankRepo.kt:269]               Estimated order fee: 'IBtEstimateFeeResponse2(feeSat=3887, networkFeeSat=1056, serviceFeeSat=2831, min0ConfTxFee=IBt0ConfMinTxFeeWindow(satPerVbyte=7.0, validityEndsAt=2026-02-23T15:14:07.801Z))'
2026-02-23 15:11:18.740 ERROR   [ldk_node::wallet:1150]              Selected UTXOs have insufficient value. Have: 100000000sats, Need at least: 100001000sats
2026-02-23 15:11:18.745 DEBUG   [LightningService.kt:847]            Calculated fee='110' for 100000000 sats to bcrt1qq0hdlxxyvc7ha2hjsl24aqk0366cezjk0f35z5, satsPerVByte=1
2026-02-23 15:11:18.748 VERBOSE [DeriveBalanceStateUseCase.kt:53]    Balances in state at block height=71625: {"totalOnchainSats":100000000,"totalLightningSats":0,"maxSendLightningSats":0,"maxSendOnchainSats":99999890,"balanceInTransferToSavings":0,"balanceInTransferToSpending":0}

@ovitrif
Copy link
Collaborator Author

ovitrif commented Feb 23, 2026

I made regtest build from this branch and tried to transfer to savings (having 1BTC onchain), but seeing "Available 0" on transfer to spending screen. Setting any amount larger than 0 makes "Continue" button inactive:

Screen.Recording.2026-02-23.at.16.18.26.mov
in the log there is:
[…]

Very interesting, because I had this issue once too, and then I couldn't repro it.

But I had it on master IIRC, definitely not on this branch, as it wasn't even created at that time.

Does your issue reproduce or it was a one-time thing?!
Maybe, before retrying, pls export all logs 🙏🏻 , so we can create an issue with as much info as possible.

Could also try on master afterwards 🙏

@ovitrif
Copy link
Collaborator Author

ovitrif commented Feb 23, 2026

@piotr-iohk PLS see above 🙏🏻
also, FWIW, I can't repro the issue here, if proof is valuable:
tts

@piotr-iohk
Copy link
Collaborator

Created a separate bug ticket #801. Managed to make it work after couple of retries (i.e. setting up wallet again and funding with 100 000 sats - eventually worked with no 0 cap when transfer to spending, it didn't work with initial balance 100 000 000, but not sure if it is balance related, b2b I think I also seen it once or twice before but couldn't reproduce later)

@piotr-iohk
Copy link
Collaborator

I can see the peer tab, can copy, id and disconnect. After app restart the peer reconnects it seems, which I guess is expected behavior?

Screenshot 2026-02-23 at 17 11 04

@ovitrif ovitrif merged commit 57c355e into release/177-hotfix Feb 23, 2026
15 checks passed
@ovitrif ovitrif deleted the release/177-hotfix-update branch February 23, 2026 16:55
@ovitrif
Copy link
Collaborator Author

ovitrif commented Feb 23, 2026

I can see the peer tab, can copy, id and disconnect. After app restart the peer reconnects it seems, which I guess is expected behavior?

Screenshot 2026-02-23 at 17 11 04

Yes, expected only for trusted peers 🙏🏻

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.

2 participants