Skip to content

feat: add managed_core_account_set_transaction_label FFI function#618

Draft
xdustinface wants to merge 2 commits intov0.42-devfrom
feat/transaction-label-ffi
Draft

feat: add managed_core_account_set_transaction_label FFI function#618
xdustinface wants to merge 2 commits intov0.42-devfrom
feat/transaction-label-ffi

Conversation

@xdustinface
Copy link
Copy Markdown
Collaborator

Add mutable access to FFIManagedCoreAccount via inner_mut() and expose a function to set or clear transaction labels by txid.

Also add comprehensive tests for:

  • managed_core_account_get_transactions with real transaction data
  • managed_core_account_free_transactions verifying no crash on free
  • Label round-trip (set, read back, clear, verify cleared)
  • Error cases (null account, missing txid)

Based on:

Just to avoid having huge data stored in the labels and i think 256 chars should be more than enough for a transaction label.
Add mutable access to `FFIManagedCoreAccount` via `inner_mut()` and
expose a function to set or clear transaction labels by txid.

Also add comprehensive tests for:
- `managed_core_account_get_transactions` with real transaction data
- `managed_core_account_free_transactions` verifying no crash on free
- Label round-trip (set, read back, clear, verify cleared)
- Error cases (null account, missing txid)
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 1, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3dc2e824-40ce-42e2-8345-c7b9a488e139

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/transaction-label-ffi

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.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 95.28986% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.69%. Comparing base (734b35f) to head (4b5f8c7).
⚠️ Report is 10 commits behind head on v0.42-dev.

Files with missing lines Patch % Lines
key-wallet-ffi/src/managed_account.rs 94.90% 13 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           v0.42-dev     #618      +/-   ##
=============================================
+ Coverage      67.21%   67.69%   +0.47%     
=============================================
  Files            321      321              
  Lines          68249    68523     +274     
=============================================
+ Hits           45874    46384     +510     
+ Misses         22375    22139     -236     
Flag Coverage Δ
core 75.21% <ø> (ø)
ffi 39.40% <94.90%> (+3.81%) ⬆️
rpc 19.92% <ø> (ø)
spv 83.72% <ø> (-0.04%) ⬇️
wallet 67.48% <100.00%> (+0.03%) ⬆️
Files with missing lines Coverage Δ
...y-wallet/src/managed_account/transaction_record.rs 100.00% <100.00%> (ø)
key-wallet-ffi/src/managed_account.rs 60.40% <94.90%> (+7.26%) ⬆️

... and 18 files with indirect coverage changes

Base automatically changed from feat/transaction-label-size to v0.42-dev April 2, 2026 22:41
@github-actions github-actions bot added the merge-conflict The PR conflicts with the target branch. label Apr 6, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them.

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

Labels

merge-conflict The PR conflicts with the target branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant