Fix transaction metadata loading issues#5449
Merged
Conversation
feb4129 to
a0e57be
Compare
swansontec
approved these changes
Feb 11, 2025
src/hooks/useTransactionList.ts
Outdated
| let relevant = false | ||
| for (const tx of txs) { | ||
| if (tx.tokenId === tokenId) { | ||
| if (tx.tokenId === tokenId && streamedTxs.some(streamedTx => streamedTx.txid === tx.txid)) { |
Contributor
There was a problem hiding this comment.
This is potentially O(n^2), but only if the core / engines have bugs that spam onTransactionChanged events. However, spamming needless events is already inefficient, so let's leave this as it is.
Contributor
|
Actually, the first commit is probably not needed, because these two fields randomly flip-flop back & forth, and we've never figured out what was the difference between the different dev's machines that was causing it. So just drop the commit, and the next time you |
a0e57be to
c7466a1
Compare
Only transactions that have been streamed are relevant for the changedTxs set because we _always_ stomp the changed tx onto the streamedTxs array.
f2590b8 to
3472d7c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have: