Skip to content

Conversation

@bordalix
Copy link
Collaborator

@bordalix bordalix commented Oct 20, 2025

@tiero please review

Summary by CodeRabbit

  • Refactor
    • Internal optimizations to wallet retrieval with no user-facing changes or impact.

@cloudflare-workers-and-pages
Copy link

Deploying wallet-signet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 49c478a
Status: ✅  Deploy successful!
Preview URL: https://485df3ea.wallet-23u.pages.dev
Branch Preview URL: https://fix-empty-coins.wallet-23u.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

Deploying wallet-mutinynet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 49c478a
Status: ✅  Deploy successful!
Preview URL: https://e21c92cd.arkade-wallet.pages.dev
Branch Preview URL: https://fix-empty-coins.arkade-wallet.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

Deploying wallet-bitcoin-v8 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 49c478a
Status: ✅  Deploy successful!
Preview URL: https://267d9b4f.wallet-v8.pages.dev
Branch Preview URL: https://fix-empty-coins.wallet-v8.pages.dev

View logs

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 20, 2025

Walkthrough

Refactored VTXO retrieval in src/lib/asp.ts to replace wallet.walletRepository.getVtxos(address) with a direct wallet.getVtxos() call, removing the intermediate address retrieval step. The surrounding loop and VTXO classification logic remain unchanged.

Changes

Cohort / File(s) Summary
VTXO retrieval refactoring
src/lib/asp.ts
Changed VTXO retrieval from wallet.walletRepository.getVtxos(address) to wallet.getVtxos(), eliminating the intermediate address lookup step

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • tiero

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The pull request title "getVtxos from worker to run from memcache trap" is partially related to the changeset. While it correctly references the main function being modified (getVtxos), the description is vague and unclear. The phrase "from memcache trap" lacks clarity and doesn't adequately explain what the actual change accomplishes. A teammate scanning the commit history would struggle to understand the technical nature of the modification (replacing wallet.walletRepository address-based retrieval with a direct getVtxos() call) based solely on this title. Consider revising the title to be more descriptive and clear. A better title might be "Replace walletRepository address-based VTXO retrieval with direct getVtxos call" or "Simplify VTXO retrieval by using getVtxos directly" to clearly communicate the technical change being made and help reviewers quickly understand the purpose of the modification.
✅ 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 changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix_empty_coins

📜 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 6a78381 and 49c478a.

📒 Files selected for processing (1)
  • src/lib/asp.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
📚 Learning: 2025-06-30T18:33:29.839Z
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.

Applied to files:

  • src/lib/asp.ts

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.

@bordalix bordalix merged commit e55295f into master Oct 20, 2025
5 checks passed
@bordalix bordalix deleted the fix_empty_coins branch November 26, 2025 14:29
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