Skip to content

feat(transaction-history): prioritize user addresses in to (recipient) list#2787

Merged
CharlVS merged 4 commits intodevfrom
codex/update-transaction-details-widget-for-multiple-addresses
Jun 25, 2025
Merged

feat(transaction-history): prioritize user addresses in to (recipient) list#2787
CharlVS merged 4 commits intodevfrom
codex/update-transaction-details-widget-for-multiple-addresses

Conversation

@takenagain
Copy link
Copy Markdown
Contributor

@takenagain takenagain commented Jun 17, 2025

Fixes #2702

  • prioritize user addresses when sanitizing transaction history
  • remove first sender address from to address list (emulating desktop wallet logic)

Examples

The following examples reproduced a bug similar to the one reported. This was done by requesting DOC/MARTY funds from the faucet. The UTXO sent back to the sender address would occasionally appear first in the to list and be displayed as the primary address in the UI.

DOC example from faucet

Details:

Before

image image

After

image image
Marty example from faucet

Details:

Before

image image

After

image image

Steps to reproduce on app.komodoplatform.com

  1. Activate DOC/MARTY if not already active.
  2. Click on DOC/MARTY to view coin details
  3. Click on "Faucet" button and wait for funds to arrive (can be "confirmed" without a specific date and time).
  4. If the address shown matches the address in the "Addresses" list, then click "Create Address" and repeat step 3.
  5. Repeat steps 3 and 4 until an incorrect address is shown.
  6. Send funds back to faucet

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 17, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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.

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


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@takenagain takenagain marked this pull request as draft June 17, 2025 14:19
@takenagain takenagain changed the title Show multiple tx recipients feat(transaction-history): show multiple to addresses and show user addresses first Jun 17, 2025
@takenagain takenagain force-pushed the codex/update-transaction-details-widget-for-multiple-addresses branch from 0045e72 to eba06db Compare June 17, 2025 14:27
@takenagain takenagain force-pushed the codex/update-transaction-details-widget-for-multiple-addresses branch from eba06db to a530f5c Compare June 19, 2025 07:52
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 19, 2025

Visit the preview URL for this PR (updated for commit 294f48a):

https://walletrc--pull-2787-merge-ampts5lz.web.app

(expires Thu, 26 Jun 2025 12:37:41 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

@takenagain takenagain self-assigned this Jun 19, 2025
@takenagain takenagain added the bug Something isn't working label Jun 19, 2025
@takenagain takenagain linked an issue Jun 19, 2025 that may be closed by this pull request
@takenagain takenagain marked this pull request as ready for review June 19, 2025 12:24
Copilot AI review requested due to automatic review settings June 19, 2025 12:24
@takenagain takenagain added the QA Ready for QA Testing label Jun 19, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances transaction history handling by removing the sender from the to list and prioritizing wallet addresses for display. Key changes include:

  • Implemented sanitize extension to filter and sort recipients.
  • Updated the BLoC to apply sanitize before emitting transaction lists.
  • Refactored the transaction list item to a dedicated _TransactionAddress widget and added comprehensive tests.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/shared/utils/extensions/transaction_extensions.dart Added sanitize method to remove sender and sort recipients.
lib/bloc/transaction_history/transaction_history_bloc.dart Applied sanitize to historical and live transaction streams.
lib/views/wallet/coin_details/transactions/transaction_list_item.dart Extracted _TransactionAddress widget for address rendering.
test_units/tests/utils/transaction_history/sanitize_transaction_test.dart New unit tests covering sanitize logic edge cases.
test_units/main.dart Registered the new sanitize transaction tests.
Comments suppressed due to low confidence (1)

lib/shared/utils/extensions/transaction_extensions.dart:9

  • The doc comment states that it returns the original transaction when there are no recipients, but the implementation always returns a new copy via copyWith. Update the documentation to match the actual behavior or adjust the code if you intend to preserve the original instance.
  /// If the transaction has no recipients, it returns the original transaction.

Comment thread lib/bloc/transaction_history/transaction_history_bloc.dart
Comment thread test_units/tests/utils/transaction_history/sanitize_transaction_test.dart Outdated
Copy link
Copy Markdown
Collaborator

@smk762 smk762 left a comment

Choose a reason for hiding this comment

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

Related issue added #2801

I note your PR comment states can be "confirmed" without a specific date and time which though not ideal, is acceptable temporarily. More importantly though, the block height and conf count is inconceivable and must be resolved.

image

@takenagain takenagain changed the title feat(transaction-history): show multiple to addresses and show user addresses first feat(transaction-history): prioritize user addresses in to (recipient) list Jun 20, 2025
@CharlVS
Copy link
Copy Markdown
Collaborator

CharlVS commented Jun 25, 2025

Related issue added #2801

I note your PR comment states can be "confirmed" without a specific date and time which though not ideal, is acceptable temporarily. More importantly though, the block height and conf count is inconceivable and must be resolved.

@smk762 since this is tied to a p0 issue (#2702), is not a regression, and will require API changes, I'd suggest considering approving it and opening an issue for the bug. When it is patched in KDF it should only require the GUI to update KDF.

@smk762 smk762 self-requested a review June 25, 2025 14:57
Copy link
Copy Markdown
Collaborator

@smk762 smk762 left a comment

Choose a reason for hiding this comment

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

Related issue added #2801
I note your PR comment states can be "confirmed" without a specific date and time which though not ideal, is acceptable temporarily. More importantly though, the block height and conf count is inconceivable and must be resolved.

@smk762 since this is tied to a p0 issue (#2702), is not a regression, and will require API changes, I'd suggest considering approving it and opening an issue for the bug. When it is patched in KDF it should only require the GUI to update KDF.

Related issue added #2801

Issue is present and I see some work towards a resolution is underway in a different PR so ✔️

Copy link
Copy Markdown
Collaborator

@CharlVS CharlVS left a comment

Choose a reason for hiding this comment

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

TYSM LGTM

@CharlVS CharlVS merged commit 03d32ad into dev Jun 25, 2025
9 of 13 checks passed
@CharlVS CharlVS deleted the codex/update-transaction-details-widget-for-multiple-addresses branch June 25, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting API bug Something isn't working codex QA Ready for QA Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tx history shows up wrong

4 participants