fix(tx-history): timestamp update without navigation#3352
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
copyWithoperations for transaction updates - Removed the unused
_sortTimehelper 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
_firstSeenAtByIdmap is being populated at lines 96-101 and 177-182 but is never read after the removal of the_sortTimemethod. This creates unnecessary memory overhead as the map will grow indefinitely with transaction IDs. Consider removing this map and the associatedputIfAbsentcalls 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
_firstSeenAtByIdmap which is no longer used after the removal of the_sortTimemethod. 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.
|
UTXO Updates are much more rapid ✔️ 🔥 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
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
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. |
|
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. |
|
@ 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 |
|
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 |


Small out-of-scope fix for #3338 that I couldn't add as a suggestion comment earlier. This adds the
timestampfield 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".