Skip to content

Conversation

@ovitrif
Copy link
Collaborator

@ovitrif ovitrif commented Oct 15, 2025

This PR updates bitkit-core dependency to the version 0.1.18 which includes serializable types.

It also adds polishing to the channel orders screen from dev settings.

Preview

Just randomly doing transfers and checking activity still works.

Screen_recording_20251016_161824.mp4

QA Notes

Regression Test: transfer to savings & back to spending, validate activity list and detail views data.

@ovitrif ovitrif self-assigned this Oct 15, 2025
@ovitrif ovitrif changed the base branch from master to feat/ldk-node-serializable October 16, 2025 14:11
@ovitrif ovitrif force-pushed the bitkit-core-serializable branch from 28652c5 to a0717bb Compare October 16, 2025 14:29
@ovitrif ovitrif marked this pull request as ready for review October 16, 2025 14:34
@jvsena42 jvsena42 requested a review from Copilot October 16, 2025 14:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Updates bitkit-core dependency to 0.1.18 (introducing nullable / serializable payment-related fields) and refactors the developer Channel Orders UI to a card + section header style while adding null-safe accessors. Key changes:

  • Dependency bump: bitkit-core from 0.1.10 to 0.1.18 and widespread adjustments for newly nullable fields (payment, lspNode, etc.).
  • Refactor of Channel Orders / Order & CJIT detail screens: structural renaming, extraction of reusable composables (InfoCard, *Card variants), added section headers, and removal of ad‑hoc copy/animation code in favor of utilities.
  • Added null-safe access (e.g., payment?, lspNode?) but introduced a few silent fallbacks that may surface incorrect or misleading UI values.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 20 comments.

Show a summary per file
File Description
gradle/libs.versions.toml Bumps bitkit-core library version.
TransferViewModel.kt Adjusts on-chain send to handle nullable payment but risks sending empty address silently.
ChannelStatusView.kt Makes payment state access nullable; adds suppression for cyclomatic complexity.
LightningConnectionsViewModel.kt Null-safe access to lspNode pubkey.
ChannelDetailScreen.kt Null-safe payment state checks for channel status logic.
ChannelOrdersScreen.kt Major UI refactor, new composables, null-safe data access; some new string and data handling issues introduced.
SectionHeader.kt Adds configurability (padding, height) and expanded preview.

lightningRepo
.sendOnChain(
address = order.payment.onchain.address,
address = order.payment?.onchain?.address.orEmpty(),
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replacing a previously non-null address with order.payment?.onchain?.address.orEmpty() risks invoking sendOnChain with an empty string, producing an invalid on-chain send attempt and hiding the underlying null condition. Prefer an early return or explicit error state when the address is null instead of silently coercing to "". Example: val address = order.payment?.onchain?.address ?: return /* or emit error */.

Copilot uses AI. Check for mistakes.
text = model.id,
maxLines = 1,
overflow = TextOverflow.MiddleEllipsis,
modifier = Modifier.clickableAlpha(onClick = copyToClipboard(model.id))
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing copyToClipboard(model.id) directly as the onClick argument assumes copyToClipboard returns a () -> Unit; if it performs the copy immediately (returns Unit) this will execute during composition and result in a type mismatch or unintended side effects. Ensure copyToClipboard returns a lambda; otherwise wrap: modifier = Modifier.clickableAlpha { copyToClipboard(model.id) }.

Suggested change
modifier = Modifier.clickableAlpha(onClick = copyToClipboard(model.id))
modifier = Modifier.clickableAlpha(onClick = { copyToClipboard(model.id) })

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Member

@jvsena42 jvsena42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested perform transfers on a fresh wallet

@jvsena42 jvsena42 merged commit 059fd2c into feat/ldk-node-serializable Oct 16, 2025
11 checks passed
@jvsena42 jvsena42 deleted the bitkit-core-serializable branch October 16, 2025 15:21
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.

3 participants