Skip to content

fix(tx-history): timestamp update without navigation#3352

Merged
smk762 merged 3 commits intodevfrom
fix/timestamp-update-without-navigation
Nov 23, 2025
Merged

fix(tx-history): timestamp update without navigation#3352
smk762 merged 3 commits intodevfrom
fix/timestamp-update-without-navigation

Conversation

@takenagain
Copy link
Copy Markdown
Contributor

@takenagain takenagain commented Nov 3, 2025

Small out-of-scope fix for #3338 that I couldn't add as a suggestion comment earlier. This adds the timestamp field to the list of fields updated on each SSE event, which will update the details of unconfirmed transactions if a user stays on the coin details page, instead of remaining labelled as "Now".

@takenagain takenagain marked this pull request as ready for review November 3, 2025 20:45
Copilot AI review requested due to automatic review settings November 3, 2025 20:45
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 3, 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.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/timestamp-update-without-navigation

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.

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 updates the transaction history handling to properly update timestamps when transactions are confirmed on the blockchain. Previously, timestamps were not being updated during transaction updates, which caused the display date to remain as "Now" even after confirmation.

  • Added explicit timestamp updates in the copyWith operations for transaction updates
  • Removed the unused _sortTime helper method that was no longer being called
  • Simplified transaction sorting logic to directly use transaction timestamps
Comments suppressed due to low confidence (2)

lib/bloc/transaction_history/transaction_history_bloc.dart:36

  • The _firstSeenAtById map is being populated at lines 96-101 and 177-182 but is never read after the removal of the _sortTime method. This creates unnecessary memory overhead as the map will grow indefinitely with transaction IDs. Consider removing this map and the associated putIfAbsent calls if it's no longer needed for sorting.
  final Map<String, DateTime> _firstSeenAtById = {};

lib/bloc/transaction_history/transaction_history_bloc.dart:68

  • This line clears the _firstSeenAtById map which is no longer used after the removal of the _sortTime method. This operation can be removed along with the map itself to reduce unnecessary code.
      _firstSeenAtById.clear();

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@takenagain takenagain requested a review from DeckerSU November 3, 2025 21:11
@smk762
Copy link
Copy Markdown
Collaborator

smk762 commented Nov 4, 2025

UTXO Updates are much more rapid ✔️ 🔥
One flaw - I noticed the flip from "unconfirmed" to "now" was premature. Checking the block explorer revealed that the transaction was, in fact, still unconfirmed.

EVM updates still appear to be non functional (or slow enough to appear so). 8 mins, 300+ confs, no update while on same page. Navigation did show the update. New Issue at: #3364

image

IRIS was fast, OSMO not (this may be due to 3rd part nodes?) - but until navigation, the value sent for IRIS was shown as zero. New Issue at #3360

image

ARRR appeared soon after the block was confirmed. This might incur a delay or 1 minute on average, but due to the nature of ARRR, I assume the mempool is not transparent enough to improve on this.

@DeckerSU
Copy link
Copy Markdown
Contributor

DeckerSU commented Nov 4, 2025

I'll approve it today - I just want to run some internal tests first. I'm also monitoring SSE to see how quickly KDF pushes new transactions right after they're created.

@CharlVS
Copy link
Copy Markdown
Collaborator

CharlVS commented Nov 4, 2025

@ smk762, please check if you see the EVM balance streaming events in your logs. KDF doesn't support EVM tx history streaming, but it does support balance streaming, so we should still manually update the TX history when a balance change event occurs.

Could you please open an issue for it?

@smk762
Copy link
Copy Markdown
Collaborator

smk762 commented Nov 5, 2025

@ smk762, please check if you see the EVM balance streaming events in your logs. KDF doesn't support EVM tx history streaming, but it does support balance streaming, so we should still manually update the TX history when a balance change event occurs.

Could you please open an issue for it?

Done : #3364

@smk762 smk762 self-requested a review November 5, 2025 04:47
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.

Provisionally approved.
Remaining issues identified and triage delegated to

@smk762 smk762 added this to the v0.9.4 milestone Nov 5, 2025
@smk762 smk762 changed the base branch from patch-fix-tx-history-sync-display to dev November 23, 2025 07:55
@smk762 smk762 merged commit 184a550 into dev Nov 23, 2025
6 of 12 checks passed
@github-actions
Copy link
Copy Markdown

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

https://walletrc--pull-3352-merge-ymq2w3dc.web.app

(expires Sun, 30 Nov 2025 08:25:55 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

@smk762 smk762 mentioned this pull request Nov 23, 2025
5 tasks
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.

5 participants