Skip to content

update boltz-swap dependency#291

Merged
Kukks merged 5 commits intomasterfrom
update_boltz_swap_dependency
Jan 5, 2026
Merged

update boltz-swap dependency#291
Kukks merged 5 commits intomasterfrom
update_boltz_swap_dependency

Conversation

@bordalix
Copy link
Copy Markdown
Collaborator

@bordalix bordalix commented Jan 5, 2026

Summary by CodeRabbit

  • New Features

    • Users can trigger Boltz swap restoration via the Boltz API label; restoration results or errors are displayed, including the number of swaps restored.
  • Chores

    • Bumped Boltz swap dependency to v0.2.15.

✏️ Tip: You can customize this high-level summary in your review settings.

@bordalix bordalix requested a review from Kukks January 5, 2026 17:42
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 5, 2026

Warning

Rate limit exceeded

@bordalix has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 54 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 517b0df and 5a6940c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • package.json
  • public/wallet-service-worker.mjs
  • src/providers/announcements.tsx

Walkthrough

Bumps @arkade-os/boltz-swap to 0.2.15, adds a hidden UI trigger in Boltz Settings that calls restoreSwaps from the Lightning context after five clicks, and extends test mocks with additional Boltz/ASP metadata fields.

Changes

Cohort / File(s) Summary
Dependency update
package.json
Bumps @arkade-os/boltz-swap from 0.2.14 to 0.2.15.
Boltz Settings UI
src/screens/Apps/Boltz/Settings.tsx
Adds useState/useEffect for a click counter and result message; makes the Boltz API URL label clickable (increments counter); when counter hits 5 calls restoreSwaps from LightningContext, handles errors, and displays a restoration summary.
Test mocks
src/test/screens/mocks.ts
Extends mockAspInfo with fields: url, signerPubkey, forfeitAddress, sessionDuration, and unilateralExitDelay for richer test metadata.

Sequence Diagram(s)

(Skipped — change is a small UI trigger and does not introduce substantial multi-component control flow requiring visualization.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • louisinger

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'update boltz-swap dependency' directly matches the primary change in package.json, which bumps the '@arkade-os/boltz-swap' dependency from 0.2.14 to 0.2.15.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Jan 5, 2026

Deploying wallet-bitcoin with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5a6940c
Status: ✅  Deploy successful!
Preview URL: https://ac04154b.wallet-bitcoin.pages.dev
Branch Preview URL: https://update-boltz-swap-dependency.wallet-bitcoin.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Jan 5, 2026

Deploying wallet-mutinynet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5a6940c
Status: ✅  Deploy successful!
Preview URL: https://9651a7c4.arkade-wallet.pages.dev
Branch Preview URL: https://update-boltz-swap-dependency.arkade-wallet.pages.dev

View logs

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Fix all issues with AI Agents 🤖
In @src/screens/Apps/Boltz/Settings.tsx:
- Around line 18-28: Update the effect to handle rejections and include
restoreSwaps in dependencies: inside the useEffect that watches counter (and add
restoreSwaps to its dependency array), call restoreSwaps via an async function
or attach a .catch handler so any rejection is caught; on success call
setResults as before, and on error call setResults with an appropriate error
message and/or log the error to console/processLogger to avoid an unhandled
promise rejection. Ensure the dependency array lists both counter and
restoreSwaps and keep the same success message logic.
🧹 Nitpick comments (1)
src/screens/Apps/Boltz/Settings.tsx (1)

43-45: Prefer c + 1 for idiomatic state update.

c += 1 works but mutates the parameter before returning. The conventional pattern is c + 1.

🔎 Suggested change
-              <div onClick={() => setCounter((c) => (c += 1))}>
+              <div onClick={() => setCounter((c) => c + 1)}>
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ebf9acb and cb40a5d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • package.json
  • src/screens/Apps/Boltz/Settings.tsx
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: bordalix
Repo: arkade-os/wallet PR: 106
File: src/lib/bolt11.ts:153-155
Timestamp: 2025-07-07T14:41:35.991Z
Learning: In src/lib/bolt11.ts, the code is copied from the original bitcoinjs/bolt11 library (https://github.com/bitcoinjs/bolt11/blob/master/payreq.js) and should be kept unchanged to maintain compatibility with the upstream source, even if there are potential improvements or syntax issues.
Learnt from: bordalix
Repo: arkade-os/wallet PR: 230
File: test.docker-compose.yml:46-46
Timestamp: 2025-11-20T12:08:19.542Z
Learning: The Docker image `boltz/boltz:ark` exists and is available for the arkade-os/wallet repository.
📚 Learning: 2025-12-20T10:09:41.030Z
Learnt from: bordalix
Repo: arkade-os/wallet PR: 278
File: src/providers/annoucements.tsx:32-50
Timestamp: 2025-12-20T10:09:41.030Z
Learning: In src/providers/annoucements.tsx, the useEffect hook depends on [config] (not just [configLoaded]) because it needs to react to config changes after nostr restoration. The seen.current ref guard prevents showing multiple announcements per session, even though the effect may re-run on config updates.

Applied to files:

  • src/screens/Apps/Boltz/Settings.tsx
📚 Learning: 2025-07-07T14:41:35.991Z
Learnt from: bordalix
Repo: arkade-os/wallet PR: 106
File: src/lib/bolt11.ts:153-155
Timestamp: 2025-07-07T14:41:35.991Z
Learning: In src/lib/bolt11.ts, the code is copied from the original bitcoinjs/bolt11 library (https://github.com/bitcoinjs/bolt11/blob/master/payreq.js) and should be kept unchanged to maintain compatibility with the upstream source, even if there are potential improvements or syntax issues.

Applied to files:

  • package.json
📚 Learning: 2025-11-20T12:08:19.542Z
Learnt from: bordalix
Repo: arkade-os/wallet PR: 230
File: test.docker-compose.yml:46-46
Timestamp: 2025-11-20T12:08:19.542Z
Learning: The Docker image `boltz/boltz:ark` exists and is available for the arkade-os/wallet repository.

Applied to files:

  • package.json
🧬 Code graph analysis (1)
src/screens/Apps/Boltz/Settings.tsx (2)
src/providers/lightning.tsx (1)
  • LightningContext (48-66)
src/providers/navigation.tsx (1)
  • NavigationContext (169-173)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: test
  • GitHub Check: Cloudflare Pages: wallet-mutinynet
🔇 Additional comments (3)
src/screens/Apps/Boltz/Settings.tsx (2)

1-12: LGTM - imports and context usage are appropriate.

The new hooks and restoreSwaps from LightningContext are properly imported and destructured.


50-54: LGTM - results display is clean.

Conditional rendering properly handles the case when results is empty vs populated.

package.json (1)

7-7: Fix terminology: This is a patch version bump, not minor.

Patch version bump to 0.2.15 aligns with the restoreSwaps functionality being used in the Settings screen.

Comment thread src/screens/Apps/Boltz/Settings.tsx Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Fix all issues with AI Agents 🤖
In @src/test/screens/mocks.ts:
- Around line 14-18: The sessionDuration value is miscalculated for "17
minutes": replace the current BigInt(1024 * 60 * 17) with BigInt(17 * 60) to
represent 17 minutes in seconds (1020), and update the inline comment to "17
minutes (seconds)"; leave other mock values (url, signerPubkey, forfeitAddress,
unilateralExitDelay) unchanged.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eeb3f96 and 517b0df.

📒 Files selected for processing (1)
  • src/test/screens/mocks.ts
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: bordalix
Repo: arkade-os/wallet PR: 106
File: src/lib/bolt11.ts:153-155
Timestamp: 2025-07-07T14:41:35.991Z
Learning: In src/lib/bolt11.ts, the code is copied from the original bitcoinjs/bolt11 library (https://github.com/bitcoinjs/bolt11/blob/master/payreq.js) and should be kept unchanged to maintain compatibility with the upstream source, even if there are potential improvements or syntax issues.
Learnt from: bordalix
Repo: arkade-os/wallet PR: 230
File: test.docker-compose.yml:46-46
Timestamp: 2025-11-20T12:08:19.542Z
Learning: The Docker image `boltz/boltz:ark` exists and is available for the arkade-os/wallet repository.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: test
  • GitHub Check: Cloudflare Pages: wallet-mutinynet

Comment thread src/test/screens/mocks.ts
Comment on lines +14 to +18
url: 'http://asp.local',
signerPubkey: 'mock_signer_pubkey',
forfeitAddress: 'mock_forfeit_address',
sessionDuration: BigInt(1024 * 60 * 17), // 17 minutes
unilateralExitDelay: BigInt(2048),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Verify the sessionDuration calculation and comment.

The calculation BigInt(1024 * 60 * 17) equals 1,044,480, but the comment states "17 minutes". If the unit is seconds, this would be approximately 290 hours, not 17 minutes. If the intended value is 17 minutes in seconds, it should be 17 * 60 = 1,020.

Please confirm whether:

  • The calculation is correct and the comment should be updated, or
  • The calculation should be adjusted to match the "17 minutes" comment

The other mock values (url, signerPubkey, forfeitAddress, unilateralExitDelay) look appropriate for testing purposes.

🤖 Prompt for AI Agents
In @src/test/screens/mocks.ts around lines 14-18, The sessionDuration value is
miscalculated for "17 minutes": replace the current BigInt(1024 * 60 * 17) with
BigInt(17 * 60) to represent 17 minutes in seconds (1020), and update the inline
comment to "17 minutes (seconds)"; leave other mock values (url, signerPubkey,
forfeitAddress, unilateralExitDelay) unchanged.

@Kukks Kukks merged commit 164ab31 into master Jan 5, 2026
5 checks passed
@Kukks Kukks deleted the update_boltz_swap_dependency branch January 5, 2026 20:16
@coderabbitai coderabbitai bot mentioned this pull request Jan 7, 2026
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