Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions __tests__/integration/hathorwallet_others.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -922,11 +922,14 @@ describe('getUtxosForAmount', () => {
{
txId: fundTx1hash,
index: expect.any(Number),
token: NATIVE_TOKEN_UID,
tokenId: NATIVE_TOKEN_UID,
type: 1,
address: addr0,
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.

Copy link
Contributor

Choose a reason for hiding this comment

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

we are using token_version to express the types of tokens. Do you see a case that this "type" could cause confusion?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I believe this can cause confusion.
In the next step of this project, where we will introduce breaking changes, we can consider changing the names of these variables.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you write an issue for it? so we can keep it on track.

heightlock: null,
locked: false,
addressPath: expect.any(String),
Expand Down
2 changes: 1 addition & 1 deletion src/nano_contracts/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
}

// Get the utxos with the amount of the deposit and create the inputs
const utxoOptions: { token: string; filter_address?: string | null } = { token: action.token };
const utxoOptions: { token: string; filter_address?: string } = { token: action.token };

Check warning on line 267 in src/nano_contracts/builder.ts

View check run for this annotation

Codecov / codecov/patch

src/nano_contracts/builder.ts#L267

Added line #L267 was not covered by tests
if (action.address) {
utxoOptions.filter_address = action.address;
}
Expand Down
Loading
Loading