fix(tx-history): only consider empty timestamp and confs as unconfirmed#3327
fix(tx-history): only consider empty timestamp and confs as unconfirmed#3327takenagain wants to merge 2 commits intodevfrom
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 transaction handling to properly manage timestamps when transactions are confirmed on the blockchain. The key change ensures that pending transactions display with the correct timestamp once confirmed, rather than continuing to show "Now".
- Updates transaction timestamp when receiving confirmed transaction data
- Refines the logic for identifying unconfirmed transactions to check both confirmations and timestamp
- Improves transaction sorting by distinguishing truly pending transactions from confirmed ones
Comments suppressed due to low confidence (1)
lib/bloc/transaction_history/transaction_history_bloc.dart:115
- The timestamp is not being updated in the historical transactions handler (line 110-115), but is updated in the new transactions handler (line 190-198). This inconsistency means that historical transactions loaded from the stream won't have their timestamps updated when confirmed, only new transactions will. Add
timestamp: sanitized.timestamp,to this copyWith call to maintain consistency.
byId[sanitized.internalId] = existing.copyWith(
confirmations: sanitized.confirmations,
blockHeight: sanitized.blockHeight,
fee: sanitized.fee ?? existing.fee,
memo: sanitized.memo ?? existing.memo,
);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
smk762
left a comment
There was a problem hiding this comment.
Seen working on a couple of DOGE and DASH transactions. Tendermint confirms too fast to catch, and I'm unable to test EVM at the moment as I cant see any history (might be rate limited, will retry later).
|
I've retried with local build, and again can not see any transaction history for any evm coins. |
@smk762 EVM coin tx history is disabled by default in debug mode since it exhausts the Etherscan rate limits quickly. It may be better now that we have proper in-memory caching, but it'd be better to enable it after we add persistent caching. You can disable it by commenting out: |
…p and confs as unconfirmed (v0.9.3)
Built release local and I see the EVM history. After making a transaction, it did not show up in history until I navigated away and back to the page (after waiting 2 mins, and seeing 73 confirmations on explorer) |
|
Visit the preview URL for this PR (updated for commit 9c818b2): https://walletrc--pull-3327-merge-9uja5frh.web.app (expires Mon, 10 Nov 2025 07:53:38 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc |
|
Closed in favour of #3338. Revert to previous timestamp sorting, alongside a Unix epoch tweak, to avoid reliance on the |
Only filters a transaction to the top as unconfirmed if both the timestamp and confirmations are 0 (timestamp = epoch).
Steps to reproduce