Repository navigation
Conversation
pablocampogo
requested changes
Sep 25, 2026
pablocampogo
left a comment
Collaborator
There was a problem hiding this comment.
Just a small change
| // Keep wallet-originated transactions consistent regardless of response order. | ||
| const isWalletSender = | ||
| typeof item.sender === "string" && | ||
| allAddresses.includes(item.sender); |
Collaborator
There was a problem hiding this comment.
Minor: since this runs for every received item, allAddresses.includes(...) is a linear scan each time. A Set built once would make it O(1):
const walletAddresses = new Set(allAddresses);
// ...
const isWalletSender =
typeof item.sender === "string" && walletAddresses.has(item.sender);
This branch has not been deployed
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.
Description
Transfers between two accounts in the wallet can alternate between Send and Receive on each dashboard refresh. Account histories load concurrently, and deduplication retains whichever account's result arrives first.
Determine whether a received transaction's sender belongs to the wallet before overriding its type. Wallet-originated transactions retain their original type regardless of response order; transfers from external senders continue to display Receive.
Related Issues
No linked issue. Reproduced in the dashboard's Recent Transactions table.
Changes Made
useDashboard.Checklist
issue-#<issue-number>. (No issue number; branch isfix/wallet-transaction-direction.)npm run prettieris not configured; used Prettier directly on the changed range.)Additional Notes
Validation:
npm run buildpassed, including TypeScript checks and the Vite production build.git diff --checkpassed.To reproduce manually, view Recent Transactions with both sides of a transfer present in the wallet, then reverse which account's history requests finish first. Before this change, the row can switch between Send with a negative amount and Receive with a positive amount. Afterward, it consistently displays Send. External incoming transfers still display Receive.
No
chain.jsonormanifest.jsoncompatibility changes. This preserves the existing Send/Receive presentation and does not introduce a new transfer type or change the layout.