Skip to content

Add slow-sync card for large UTXO wallets - #6206

Open
j0ntz wants to merge 1 commit into
developfrom
jon/big-utxo-wallet-card
Open

j0ntz wants to merge 1 commit into
developfrom
jon/big-utxo-wallet-card

Conversation

@j0ntz

@j0ntz j0ntz commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Description

Large UTXO wallets sync slowly and can display a stale, too-high balance, which sends users to support twice: first for "insufficient funds" on a send, then for "you stole my funds" after they are told to resync. This adds a warning card to the wallet details scene for Bitcoin-family wallets with a long transaction history, explaining the slow sync, warning that the balance can read high until it finishes, and linking to the support article that covers the resync.

Asana: https://app.asana.com/0/1215088146871429/1216111164285203

Design choices, all recorded on the task:

  • Trigger is 100 transactions on a mainnet UTXO wallet. The operator's ruling was "100 tx's or xpub addrs". Used-xpub-address and UTXO counts are not reachable from the GUI (edge-currency-plugins' UtxoEngine ships otherMethods: {}, and core's getAddresses returns only fresh receive addresses), so the transaction count from EdgeCurrencyWallet.getNumTransactions stands in for both. Support's two sampled wallets were 164 tx / 162 addresses and 310 tx / 293 addresses, so the two measures track each other and both wallets trigger on transaction count alone.
  • Not gated on an in-progress sync, and not dismissible. The confusion this targets happens while the wallet reports itself fully synced but has not scanned distant addresses, so hiding the card outside an active sync would hide it exactly when the tickets get filed. ZcashMigrationCard is the precedent for a permanent conditional card.
  • Existing yellow UI4 warning card, per operator ruling on the task: AlertCardUi4 with type="warning", the same component and treatment as the sync-status card immediately above it, rather than a custom informational styling.
  • UTXO_PLUGIN_IDS mirrors edge-currency-plugins' src/common/utxobased/info directory. bityProvider.ts keeps its own narrower copy of that list; deduplicating it would pull an unrelated payment provider and seven pre-existing lint errors into this diff, so it is left alone.

The learn-more URL is overridable per white-label build through config.largeUtxoWalletLearnMoreUrl, the same shape as zcashMigrationLearnMoreUrl.

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Note

Low Risk
Informational UI and async transaction counting on the wallet scene only; no changes to sends, balances, or sync logic.

Overview
Adds a non-dismissible warning card on the wallet transaction scene for mainnet Bitcoin-family wallets whose transaction count is at least 100, explaining that long histories sync slowly, balances can look too high until scanning finishes, and sends may fail with insufficient funds until then.

The card uses the existing AlertCardUi4 warning styling (below the sync card) with copy in locales and a Learn More link to a support article, overridable via config.largeUtxoWalletLearnMoreUrl. Visibility is not tied to an active sync, since fully “synced” wallets can still show stale balances.

TransactionListTop loads the count with getNumTransactions, re-evaluates when balanceMap changes during sync, and only shows the card when the count belongs to the current wallet id (avoids flashing after wallet switches). Shared helpers UTXO_PLUGIN_IDS, isUtxoPluginId, and LARGE_UTXO_WALLET_TX_COUNT live in wallet constants; a snapshot test covers LargeUtxoWalletCard.

Reviewed by Cursor Bugbot for commit acd02f9. Bugbot is set up for automated code reviews on this repo. Configure here.

Test evidence

acd02f9
Add slow-sync card for large UTXO wallets
🪓 lowered LARGE_UTXO_WALLET_TX_COUNT from 100 to 20 locally so a real 28-transaction DASH wallet crosses the real threshold comparison; reverted before commit.

under threshold no card

🪓 card on utxo wallet

🪓 no card on non utxo wallet

🪓 learn more opens article

🪓 no stale card after wallet switch

🪓 warning card restyle

@j0ntz
j0ntz force-pushed the jon/big-utxo-wallet-card branch from a9cd60b to 5393630 Compare September 8, 2026 23:34
@j0ntz
j0ntz marked this pull request as ready for review September 8, 2026 23:34
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5393630. Configure here.

Comment thread src/components/themed/TransactionListTop.tsx Outdated
@j0ntz
j0ntz force-pushed the jon/big-utxo-wallet-card branch from 5393630 to 0326bb9 Compare September 8, 2026 23:50
@j0ntz
j0ntz force-pushed the jon/big-utxo-wallet-card branch from 0326bb9 to acd02f9 Compare September 15, 2026 23:06
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.

1 participant