From 5e1896cbc9a3e1cd8f901457ef4736f55466fd64 Mon Sep 17 00:00:00 2001 From: Ovi Trif Date: Thu, 5 Mar 2026 14:36:40 +0100 Subject: [PATCH 1/2] fix: use send-all fee estimation for max channel fundable amount MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit maxChannelFundableAmount() passes the full onchain balance as the send amount to calculateTotalFee(), which creates a change output that falls below the dust limit (546 sats) when balance ≈ amount + fees. This causes ldk-node's coin selection to fail with "CoinSelectionFailed". Use estimateSendAllFee() instead, which builds a drain transaction with no change output — the correct API for computing "balance minus fees". Co-Authored-By: Claude Opus 4.6 --- Bitkit/ViewModels/WalletViewModel.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Bitkit/ViewModels/WalletViewModel.swift b/Bitkit/ViewModels/WalletViewModel.swift index 1251f1f0..d1d35b9f 100644 --- a/Bitkit/ViewModels/WalletViewModel.swift +++ b/Bitkit/ViewModels/WalletViewModel.swift @@ -557,9 +557,8 @@ class WalletViewModel: ObservableObject { return fundableBalance } let feeRate = TransactionSpeed.normal.getFeeRate(from: feeRates) - let fee = try await lightningService.calculateTotalFee( + let fee = try await lightningService.estimateSendAllFee( address: onchainAddress, - amountSats: fundableBalance, satsPerVByte: feeRate ) return fundableBalance >= fee ? fundableBalance - fee : 0 From 20d5b15d9b61564dd437eb70aeb521a356852354 Mon Sep 17 00:00:00 2001 From: Ovi Trif Date: Thu, 5 Mar 2026 15:05:54 +0100 Subject: [PATCH 2/2] fix(ci): enable Claude Code Review to post PR comments Add --comment flag to prompt so review output is posted as PR comments instead of discarded. Add --allowedTools to permit gh/git commands. Add concurrency group to cancel redundant runs on force-pushes. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/claude-code-review.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 899ee3d9..15a8a0ce 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -10,6 +10,10 @@ on: # - "src/**/*.js" # - "src/**/*.jsx" +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + jobs: claude-review: # Optional: Filter by PR author @@ -58,7 +62,9 @@ jobs: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' plugins: 'code-review@claude-code-plugins' - prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}' + prompt: '/code-review:code-review --comment ${{ github.repository }}/pull/${{ github.event.pull_request.number }}' + claude_args: | + --allowedTools "Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh api:*),Bash(git log:*),Bash(git diff:*),Bash(git blame:*),Read,Glob,Grep" # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md # or https://code.claude.com/docs/en/cli-reference for available options