Skip to content

Conversation

@originalix
Copy link

@originalix originalix commented Nov 25, 2025

Summary by CodeRabbit

  • New Features

    • Added an optional skipUtxoSelection setting to give advanced control over transaction input selection.
  • Tests

    • Added a new test scenario covering the skipUtxoSelection behavior to ensure correct fee and output handling.
  • Chores

    • Version bumped to 3.1.15.
    • CI workflow updated to use newer action versions and improved install commands.

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

@revan-zhang
Copy link

revan-zhang commented Nov 25, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai
Copy link

coderabbitai bot commented Nov 25, 2025

Walkthrough

This release bumps the package version and adds an optional skipUtxoSelection parameter to coinSelect, which is passed through to composeTx. Tests and fixtures were updated to cover the new option.

Changes

Cohort / File(s) Summary
Version bump
package.json
Updated version from 3.1.14 to 3.1.15.
Core implementation
witness.js
Added optional skipUtxoSelection parameter (default false) to coinSelect and forwarded it into the composeTx options.
Tests & fixtures
test/fixtures/witness.js, test/witness.js
Added a fixture for the skipUtxoSelection scenario; test runner now passes skipUtxoSelection to coinSelect and uses a deep-compare helper for input verification.
CI workflow
.github/workflows/main_ci.yml
Updated GitHub Actions to use newer actions (checkout@v4, setup-node@v4) and switched install step to npm ci.

Sequence Diagram(s)

sequenceDiagram
    participant Test as test/witness.js
    participant Lib as witness.js (coinSelect)
    participant Compose as composeTx

    rect rgb(230,248,255)
    Test->>Lib: call coinSelect(targets, utxos, { skipUtxoSelection: true })
    end

    rect rgb(240,255,230)
    Lib->>Compose: composeTx(..., options { skipUtxoSelection: true })
    Compose-->>Lib: tx result
    end

    Lib-->>Test: return result (inputs, outputs, fee, bytes, type)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Pay attention to correct defaulting and propagation of skipUtxoSelection in witness.js.
  • Verify test compareOutputs/deep-compare usage and that the new fixture's expected values align with current coin selection behavior.
  • Quick skim of CI changes to confirm no unexpected side-effects.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes both main changes: adding skipUtxoSelection option and bumping version to 3.1.15, matching the raw_summary and pr_objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/coin-control

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6bf125e and 4b0e62a.

📒 Files selected for processing (1)
  • .github/workflows/main_ci.yml (1 hunks)
⏰ 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). (1)
  • GitHub Check: Socket Security: Pull Request Alerts
🔇 Additional comments (1)
.github/workflows/main_ci.yml (1)

19-50: CI workflow updates are solid.

Action versions (v4) are current and maintained, and npm ci is the right choice for CI environments—it locks dependencies from package-lock.json, ensuring reproducible builds. Changes are applied consistently across all three jobs.


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

@Minnzen Minnzen enabled auto-merge (squash) November 25, 2025 17:04
@Minnzen Minnzen merged commit 950a313 into master Nov 26, 2025
11 checks passed
@Minnzen Minnzen deleted the feat/coin-control branch November 26, 2025 03:10
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.

5 participants