[Cashtab] Lock the UI until initial utxo sync is complete
Summary:
User feedback of repeated txids created, esp when rapid-fire using app or extension-created txs. The likely cause is that Cashtab UI loads unlocked before the utxos sync. This was an intentional design decision from back when this kind of use case did not exist, and utxo syncing without chronik took much longer.
To balance current priorities, we introduce a lighter method, startupUtxoSync, which is called only at app startup and only syncs the utxo set of the active wallet. This means load time is optimized for extension or webapp users who are not viewing tokens or tx history. We lock the UI until utxos are synced, ensuring that we do not attempt to create txs with a stale utxo set.
We still do the full update() on startup after unlocking the UI, as we call update() after completing startupUtxoSync.
Test Plan: npm test, npm run extension and use for rapid fire webapp txs e.g. at blitzchips, note no repeated txids
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18559