Skip to content

Conversation

@louisinger
Copy link
Contributor

@louisinger louisinger commented Jan 24, 2026

Summary by CodeRabbit

  • Chores

    • Switched wallet SDK source to a repository reference.
    • Added workspace configuration to limit built dependencies.
    • Wallet initialization now supports a configurable delegator URL.
  • Known Issue

    • Transaction settlement logic has been temporarily disabled (early return), so settlement flows are currently inactive.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Walkthrough

Updated dependency source for @arkade-os/sdk, added pnpm-workspace.yaml, introduced an optional delegatorUrl parameter to wallet initialization and forwarded it to ServiceWorkerWallet.setup, and short-circuited settleVtxos to return immediately.

Changes

Cohort / File(s) Summary
Dependency Update
package.json
Changed @arkade-os/sdk from npm version 0.3.12 to GitHub reference github:louisinger/wallet-sdk#delegator.
Workspace Config
pnpm-workspace.yaml
Added workspace file with onlyBuiltDependencies containing @arkade-os/sdk.
Wallet Provider Configuration
src/providers/wallet.tsx
Added optional delegatorUrl?: string parameter to initSvcWorkerWallet (default: https://delegator.mutinynet.arkade.sh/api/) and passed delegatorUrl to ServiceWorkerWallet.setup.
Settlement Logic
src/lib/asp.ts
settleVtxos now returns immediately (disabled settlement flow), bypassing input gathering, validation, output construction, and wallet.settle invocation.

Sequence Diagram(s)

sequenceDiagram
  rect rgba(220,240,255,0.5)
    participant App
    participant WalletProvider
    participant ServiceWorkerWallet
    participant DelegatorAPI
  end
  App->>WalletProvider: call initSvcWorkerWallet(..., delegatorUrl)
  WalletProvider->>ServiceWorkerWallet: setup(..., delegatorUrl)
  ServiceWorkerWallet->>DelegatorAPI: use delegatorUrl for delegation calls
  DelegatorAPI-->>ServiceWorkerWallet: delegation responses
  ServiceWorkerWallet-->>WalletProvider: setup complete
  WalletProvider-->>App: wallet initialized
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • bordalix
  • tiero
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Delegator' is too vague and generic. While the PR does add delegator-related functionality (delegatorUrl parameter, GitHub dependency change), the title alone doesn't meaningfully convey what was changed or why. Use a more descriptive title that explains the actual change, such as 'Add configurable delegatorUrl parameter to wallet initialization' or 'Support custom delegator endpoint configuration'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 Jan 24, 2026

Deploying wallet-bitcoin with  Cloudflare Pages  Cloudflare Pages

Latest commit: 339de71
Status: ✅  Deploy successful!
Preview URL: https://1b526645.wallet-bitcoin.pages.dev
Branch Preview URL: https://delegator.wallet-bitcoin.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

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

Deploying wallet-mutinynet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 339de71
Status: ✅  Deploy successful!
Preview URL: https://1bbdccf8.arkade-wallet.pages.dev
Branch Preview URL: https://delegator.arkade-wallet.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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/providers/wallet.tsx (1)

234-240: delegatorUrl is not passed in the retry call.

When retrying after a timeout, delegatorUrl is not forwarded to the recursive call, causing it to fall back to the default value instead of preserving the originally provided URL.

🐛 Proposed fix
           return initSvcWorkerWallet({
             arkServerUrl,
             esploraUrl,
             privateKey,
             retryCount: retryCount + 1,
             maxRetries,
+            delegatorUrl,
           })
🤖 Fix all issues with AI agents
In `@package.json`:
- Line 8: The package.json entry for the dependency "@arkade-os/sdk":
"github:louisinger/wallet-sdk#delegator" points to a mutable personal-branch;
replace it with a stable reference before merging by either (a) switching to the
published npm version of `@arkade-os/sdk` that contains the delegator changes
(e.g., "@arkade-os/sdk": "x.y.z"), or (b) pinning the GitHub reference to an
immutable commit SHA (e.g., "github:louisinger/wallet-sdk#<commit-sha>") and, if
possible, use the organization’s repository instead of a personal fork to ensure
reproducible builds.

In `@src/providers/wallet.tsx`:
- Line 167: The default delegatorUrl is hardcoded to Mutiny testnet; update the
code that sets delegatorUrl to derive it from the active network instead of a
fixed string: use aspInfo.network (or the same network source used for
esploraUrl) and compute the delegator base via a helper similar to
getRestApiExplorerURL (or add a getDelegatorURL(network) function) so the
delegatorUrl choice follows the network/environment and works for mainnet and
other networks.

"dependencies": {
"@arkade-os/boltz-swap": "0.2.18",
"@arkade-os/sdk": "0.3.12",
"@arkade-os/sdk": "github:louisinger/wallet-sdk#delegator",
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 | 🟠 Major

GitHub branch dependency is not suitable for production.

Using github:louisinger/wallet-sdk#delegator references a mutable branch in a personal fork, which:

  • Makes builds non-reproducible (the branch content can change at any time)
  • Creates a dependency on a personal repository rather than the organization's
  • Will break if the branch is deleted or force-pushed

Before merging to master, this should be replaced with either:

  1. A published npm version containing the delegator changes
  2. A commit SHA reference for reproducibility (e.g., github:louisinger/wallet-sdk#<commit-sha>)
🤖 Prompt for AI Agents
In `@package.json` at line 8, The package.json entry for the dependency
"@arkade-os/sdk": "github:louisinger/wallet-sdk#delegator" points to a mutable
personal-branch; replace it with a stable reference before merging by either (a)
switching to the published npm version of `@arkade-os/sdk` that contains the
delegator changes (e.g., "@arkade-os/sdk": "x.y.z"), or (b) pinning the GitHub
reference to an immutable commit SHA (e.g.,
"github:louisinger/wallet-sdk#<commit-sha>") and, if possible, use the
organization’s repository instead of a personal fork to ensure reproducible
builds.

privateKey,
retryCount = 0,
maxRetries = 5,
delegatorUrl = 'https://delegator.mutinynet.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 | 🟠 Major

Hardcoded delegator URL is environment-specific.

The default delegatorUrl is hardcoded to mutinynet, but the wallet supports multiple networks (the codebase has start:mainnet script and uses aspInfo.network). This URL won't work for mainnet deployments.

Consider deriving the delegator URL from the network/environment configuration, similar to how esploraUrl is derived via getRestApiExplorerURL(network).

🤖 Prompt for AI Agents
In `@src/providers/wallet.tsx` at line 167, The default delegatorUrl is hardcoded
to Mutiny testnet; update the code that sets delegatorUrl to derive it from the
active network instead of a fixed string: use aspInfo.network (or the same
network source used for esploraUrl) and compute the delegator base via a helper
similar to getRestApiExplorerURL (or add a getDelegatorURL(network) function) so
the delegatorUrl choice follows the network/environment and works for mainnet
and other networks.

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