Skip to content

list_transfers to take an AssetFilter and an optional txid - #97

Merged
zoedberg merged 1 commit into
RGB-Tools:masterfrom
dcorral:upstream-list-transfers-filter
Aug 10, 2026
Merged

list_transfers to take an AssetFilter and an optional txid#97
zoedberg merged 1 commit into
RGB-Tools:masterfrom
dcorral:upstream-list-transfers-filter

Conversation

@dcorral

@dcorral dcorral commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Breaking change to list_transfers, replacing the asset_id: Option parameter (where None meant "transfers not connected to a specific asset") with two explicit parameters:

  • filter: AssetFilter. Any (all transfers), NoAsset (transfers not connected to a specific asset, the old None behavior), or Id(asset_id) (the old Some behavior, still validated with AssetNotFound)
  • txid: Option. When set, restricts the result to the transfers committed by that on-chain transaction; combined with an asset filter it acts as an intersection; an unknown txid returns an empty list

This makes it possible to look up the transfers behind a given on-chain transaction without listing per asset and filtering client-side.

@dcorral
dcorral marked this pull request as draft August 6, 2026 12:07
@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.24%. Comparing base (03f6068) to head (ecb9842).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #97   +/-   ##
=======================================
  Coverage   96.23%   96.24%           
=======================================
  Files          24       24           
  Lines       13396    13418   +22     
=======================================
+ Hits        12892    12914   +22     
  Misses        504      504           
Flag Coverage Δ
rust 96.24% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@dcorral
dcorral force-pushed the upstream-list-transfers-filter branch from 1d69856 to b82342b Compare August 6, 2026 12:09
@dcorral
dcorral marked this pull request as ready for review August 6, 2026 12:21
@dcorral dcorral changed the title Rework list_transfers to take an AssetFilter and an optional txid list_transfers to take an AssetFilter and an optional txid Aug 6, 2026

@zoedberg zoedberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! Please address the requested changes

Comment thread src/wallet/objects.rs Outdated
Comment thread bindings/uniffi/src/lib.rs Outdated
Comment thread src/database/mod.rs Outdated
Comment thread src/wallet/objects.rs Outdated
Comment thread src/wallet/objects.rs Outdated
Comment thread src/wallet/test/utils/api.rs Outdated
Comment thread src/wallet/objects.rs Outdated
Comment thread src/wallet/objects.rs Outdated
Comment thread src/wallet/test/list_transfers.rs Outdated
Comment thread src/wallet/test/list_transfers.rs Outdated
@dcorral
dcorral force-pushed the upstream-list-transfers-filter branch 2 times, most recently from ed45764 to 768842c Compare August 7, 2026 09:51
@dcorral
dcorral requested a review from zoedberg August 7, 2026 10:12
Comment thread src/wallet/offline.rs Outdated
@dcorral
dcorral force-pushed the upstream-list-transfers-filter branch 2 times, most recently from 6e46c17 to 4778316 Compare August 8, 2026 13:52

@zoedberg zoedberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's use db_data, to avoid the extra query

note that this change will make you revert the ones you did to src/database/mod.rs

Comment thread src/wallet/offline.rs Outdated
@dcorral
dcorral force-pushed the upstream-list-transfers-filter branch from 4778316 to ecb9842 Compare August 10, 2026 09:48
@dcorral
dcorral requested a review from zoedberg August 10, 2026 09:51

@zoedberg zoedberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thank you!

@zoedberg
zoedberg merged commit 2b9af11 into RGB-Tools:master Aug 10, 2026
25 checks passed
@dcorral
dcorral deleted the upstream-list-transfers-filter branch August 10, 2026 10:55
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