- error precision: in case there is an error but it's not a "NotEnoughBalance" error, we display it instead
- canBeSpent(a,t)=>Promise<bool> was replaced by checkCanBeSpent(a,t)=>Promise<void> which will throw if something is wrong (NotEnoughBalance or something else!)
- cache eviction of bad error: in case such an error happen, we clear the cache to allow to always retry the call that fails
- the cache make sure it is always up to date by taking a.blockHeight
- a priority queue
- don't sync during critical part of the app
- don't sync more than 2 at same time
- sync when opening a specific account
- sync a selected account in the send/receive modals
- refresh countervalue in send
room for improvment around this:
withLibcore() need to lock less often. typically we lock the whole libcore during a http call triggered by a sync. this blocks the Sign Transaction on device to happen. we also need to be able to interrupt a sync, which is not yet implemented.