Skip to content

fix(history): keep the wallet's own EVM sends listed when the history read fails, and name the failed network beside them [PER-3031] - #2458

Open
filipetamota wants to merge 1 commit into
mainfrom
fmota/per-3031
Open

filipetamota wants to merge 1 commit into
mainfrom
fmota/per-3031

Conversation

@filipetamota

Copy link
Copy Markdown
Collaborator

Pull Request Template

Description

When the History backend call failed for an EVM account (an outage, a rate limit, or a network with no Pera history service), the whole list errored and the wallet's own open sends disappeared with it, so a send stuck behind a nonce gap had no row, no Waiting on an earlier transaction notice and no way to Unblock, speed up or cancel it [PER-3031].

  • The wallet's own sends are now read by a separate ledger query (usePendingTransactionRecordsQuery, SQLite only, re-read on every ledger change) and merged on read into useTransactionRecordsQuery, so a failed backend read never takes them away; backend pages now hold only the backend's records (getMinedTransactionHistory), and when the backend lists a send, its own row wins over the ledger's.
  • A failed refresh of page one with rows still listed is reported as isRefreshFailed (a later page's failure is left to the list), and both Account History and the asset transaction list show a shared HistoryFailedNotice, Couldn't load transactions on Ethereum, above the rows instead of the full-screen error.
  • The notice deliberately hides while offline, since the app's offline banner already says so and every read would fail, and offers Retry only when the network has the history service.
  • Retry now re-reads the page that failed: page one after a failed refresh, even with older pages loaded, which used to call fetchNextPage and leave page one stale.
  • The All networks view names every network that failed while others' rows show, including one listing only its own sends.
  • useAccountHistory drops under the 300-line limit by moving its filter sheet and CSV export into useAccountHistoryFilter and useAccountHistoryCsvExport, with no behaviour change.

Covered by specs for the ledger query, the merge function and the records query for each failure (network error, 5xx, PeraServiceUnavailableError, recovery without a duplicate row, a send made after a good load), the rows hook flags and retry target, mergeHistoryFeeds and the notice hook, plus an integration flow rendering History with a send stuck behind a dropped nonce while the history read fails, and device QA against a mocked failing backend.

Related Issues

Closes https://linear.app/algorandfoundation/issue/PER-3031/show-the-wallets-own-pending-evm-sends-in-history-when-the-backend

Checklist

  • Have you tested your changes locally?
  • Have you reviewed the code for any potential issues?
  • Have you documented any necessary changes in the project's documentation?
  • Have you added any necessary tests for your changes?
  • Have you updated any relevant dependencies?

Additional Notes

  • Add any additional notes or comments that may be helpful for reviewers.

… read fails, and name the failed network beside them
@filipetamota
filipetamota requested a review from a team as a code owner November 16, 2026 15:25
@linear-code

linear-code Bot commented Nov 16, 2026

Copy link
Copy Markdown

PER-3031

@github-actions

Copy link
Copy Markdown

Device e2e flows affected

9 suites (105 scenarios, 26 p0): accounts, assets, deeplinks, multisig, persistence, quantum, rekey, send_receive, transactions

Suite Why
accounts module accounts
assets module accounts
module assets
deeplinks module assets
multisig module accounts
persistence module accounts
quantum module accounts
rekey module accounts
send_receive module assets
module transactions
packages/transactions
transactions module accounts
module transactions
packages/transactions

Run them:

  • BrowserStack: the E2E / BrowserStack workflow with include = accountsORassetsORdeeplinksORmultisigORpersistenceORquantumORrekeyORsend-receiveORtransactions
  • A device: e2e/tools/run.sh <android|ios> --include accountsORassetsORdeeplinksORmultisigORpersistenceORquantumORrekeyORsend-receiveORtransactions

@yasin-ce yasin-ce left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moves the wallet's own EVM sends out of the backend pages into their own ledger query, merged on read, so a failed history read no longer hides a stuck send. Failed refreshes show a shared notice above the rows. The design is sound and the coverage is thorough: specs for each failure type, the retry target and an integration flow. CI is green.

Nothing blocking. A few questions on the ledger read's now-unused listedIds/cap semantics, and on how the new notice behaves for networks without the service and for transient refresh failures.

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.

2 participants