Skip to content

fix boltz url#158

Merged
bordalix merged 3 commits intomasterfrom
boltz_urls
Oct 14, 2025
Merged

fix boltz url#158
bordalix merged 3 commits intomasterfrom
boltz_urls

Conversation

@bordalix
Copy link
Collaborator

@bordalix bordalix commented Oct 13, 2025

@tiero please review

Summary by CodeRabbit

  • New Features

    • Added Signet network support and replaced Testnet with Signet in Lightning flows.
    • Lightning service URL configurable via environment with a safe default.
  • Chores

    • Removed an unused public constant.
    • Removed noisy invoice logging.
  • Refactor

    • Simplified Lightning provider initialization to rely on centralized base URL configuration.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 13, 2025

Deploying wallet-signet with  Cloudflare Pages  Cloudflare Pages

Latest commit: e24d7d9
Status: ✅  Deploy successful!
Preview URL: https://62b818f5.wallet-23u.pages.dev
Branch Preview URL: https://boltz-urls.wallet-23u.pages.dev

View logs

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 13, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Removed exported BoltzUrl constant, switched Boltz base URLs to be derived from environment (added signet, replaced testnet), updated Lightning provider to read those BASE_URLS directly, and removed a debug console log in the Receive QR flow.

Changes

Cohort / File(s) Summary
Boltz constants
src/lib/constants.ts
Removed exported BoltzUrl constant (previously export const BoltzUrl = import.meta.env.VITE_BOLTZ_URL).
Lightning provider URL sourcing
src/providers/lightning.tsx
BASE_URLS now reads VITE_BOLTZ_URL with a fallback, replaces testnet with signet and adds signet URL, regtest unchanged; removed import/use of BoltzUrl; provider baseUrl taken directly from BASE_URLS[...].
Logging cleanup
src/screens/Wallet/Receive/QrCode.tsx
Removed consoleLog import and the debug log after reverse-swap invoice creation; no other behavior changes.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Env as Environment (VITE_BOLTZ_URL)
    participant BASE as BASE_URLS
    participant LP as LightningProvider
    note right of Env #eef2ff: Build-time/env lookup
    Env->>BASE: provide optional VITE_BOLTZ_URL
    BASE->>LP: supply baseUrl for aspInfo.network (bitcoin/signet/regtest)
    alt baseUrl present
        LP->>LP: initialize provider with baseUrl
    else no baseUrl
        LP->>LP: early return / no provider initialized
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

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 succinctly captures the core update in the pull request by indicating a fix to the Boltz URL handling and directly relates to the modifications made across constants and provider files without extraneous detail.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between be5bcbe and e24d7d9.

📒 Files selected for processing (1)
  • src/providers/lightning.tsx (2 hunks)

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

cloudflare-workers-and-pages bot commented Oct 13, 2025

Deploying wallet-mutinynet with  Cloudflare Pages  Cloudflare Pages

Latest commit: be5bcbe
Status: ✅  Deploy successful!
Preview URL: https://ea450e76.arkade-wallet.pages.dev
Branch Preview URL: https://boltz-urls.arkade-wallet.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 13, 2025

Deploying wallet-bitcoin-v8 with  Cloudflare Pages  Cloudflare Pages

Latest commit: be5bcbe
Status: ✅  Deploy successful!
Preview URL: https://1bffae33.wallet-v8.pages.dev
Branch Preview URL: https://boltz-urls.wallet-v8.pages.dev

View logs

Copy link
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

🧹 Nitpick comments (1)
src/providers/lightning.tsx (1)

10-10: LGTM! Good practice for production configurability.

The environment variable support allows runtime configuration of the Boltz URL for the bitcoin network, with a sensible fallback to maintain backward compatibility.

Consider documenting the VITE_BOLTZ_URL environment variable in the project's README or environment configuration guide for easier deployment setup.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fce53cf and 2ab5907.

📒 Files selected for processing (3)
  • src/lib/constants.ts (0 hunks)
  • src/providers/lightning.tsx (2 hunks)
  • src/screens/Wallet/Receive/QrCode.tsx (0 hunks)
💤 Files with no reviewable changes (2)
  • src/lib/constants.ts
  • src/screens/Wallet/Receive/QrCode.tsx
🔇 Additional comments (1)
src/providers/lightning.tsx (1)

45-46: LGTM! Clean implementation with proper safety check.

The direct usage of BASE_URLS with a type cast is safe because line 46 properly handles the case where the network is not supported. The provider creation will be skipped gracefully for unsupported networks.

bitcoin: import.meta.env.VITE_BOLTZ_URL ?? 'https://boltz-v8.arkade.sh',
mutinynet: 'https://boltz.mutinynet.arkade.sh',
testnet: 'https://boltz.testnet.arkade.sh',
signet: 'https://boltz.signet.arkade.sh',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify the testnet network removal doesn't break existing deployments.

The addition of signet network support is good. However, according to the AI summary, testnet was replaced with signet. Ensure that no existing deployments or configurations rely on the testnet network type.

Run the following script to check for any testnet references:


🏁 Script executed:

#!/bin/bash
# Description: Search for testnet references in the codebase to ensure removal doesn't break functionality

# Search for testnet network references
echo "=== Searching for 'testnet' references ==="
rg -n --type=ts --type=tsx -i 'testnet' -C 2

# Search for Network type definition to see all valid network values
echo -e "\n=== Searching for Network type definition ==="
ast-grep --pattern 'type Network = $_' 
ast-grep --pattern 'enum Network { $$$ }'

# Check if aspInfo.network can return 'testnet'
echo -e "\n=== Checking aspInfo network assignments ==="
rg -n --type=ts --type=tsx 'network.*=.*testnet' -C 2

Length of output: 191


🏁 Script executed:

#!/bin/bash
echo "=== Searching for 'testnet' references ==="
rg -n -C2 -i 'testnet' -- '*.ts' '*.tsx'

echo -e "\n=== Searching for Network type definition ==="
rg -n -C2 'type\s\+Network\s*=' -- '*.ts' '*.tsx'
rg -n -C2 'enum\s\+Network' -- '*.ts' '*.tsx'

echo -e "\n=== Checking aspInfo.network assignments ==="
rg -n -C2 'aspInfo\.network\s*=\s*["'"'"']testnet["'"'"']' -- '*.ts' '*.tsx'

Length of output: 499


🏁 Script executed:

#!/bin/bash
echo "=== Searching for 'testnet' references ==="
rg -n -C2 -i 'testnet' -g '*.ts' -g '*.tsx'

echo -e "\n=== Searching for Network type definition ==="
rg -n -C2 'type\s\+Network\s*=' -g '*.ts' -g '*.tsx'
rg -n -C2 'enum\s\+Network' -g '*.ts' -g '*.tsx'

echo -e "\n=== Checking aspInfo.network assignments ==="
rg -n -C2 'aspInfo\.network\s*=\s*["'"'"']testnet["'"'"']' -g '*.ts' -g '*.tsx'

Length of output: 827


Address inconsistent network mappings for testnet and signet

src/lib/explorers.ts still defines and uses testnet endpoints (lines 24–27, 45–46), but lightning.tsx now replaces testnet with signet. This mismatch will break testnet flows—either re-add testnet support in the provider or update explorers.ts (and the Network type) to handle signet.

@bordalix bordalix merged commit c66340a into master Oct 14, 2025
2 of 3 checks passed
@bordalix bordalix deleted the boltz_urls branch October 15, 2025 13:51
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