Skip to content

Conversation

@tuliomir
Copy link
Contributor

@tuliomir tuliomir commented Jan 2, 2026

Acceptance Criteria

  • Adds typings to the UTXO Management methods
  • Adjusts some return values to match the expected properties for all consumers
  • Adapts the tests for the adjusted types

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

inputs.push({
txId: utxo.tx_id,
index: utxo.index,
token: tokenUid,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: token is now a mandatory property for Inputs and Outputs, so I had to add it here.

While the code handles perfectly the token being absent, the new types do not allow it.

@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

❌ Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.61%. Comparing base (b364bb3) to head (697561e).

Files with missing lines Patch % Lines
src/new/wallet.ts 89.65% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #987      +/-   ##
==========================================
+ Coverage   86.59%   86.61%   +0.01%     
==========================================
  Files         113      113              
  Lines        8400     8402       +2     
  Branches     1852     1858       +6     
==========================================
+ Hits         7274     7277       +3     
  Misses       1097     1097              
+ Partials       29       28       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tuliomir tuliomir moved this from Todo to In Progress (WIP) in Hathor Network Jan 2, 2026
@tuliomir tuliomir moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Jan 2, 2026
value: 10n,
authorities: 0n,
timelock: null,
height: null,
Copy link
Contributor Author

@tuliomir tuliomir Jan 2, 2026

Choose a reason for hiding this comment

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

This is a bit polemic: we needed to modify the return properties for getUtxosForAmount to respect the IUtxo type interface.

The height and token properties were added. type will be needed anyway for the new fee tokens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress (Done)

Development

Successfully merging this pull request may close these issues.

2 participants