This adds error handling to the deposit restoreState saga. Before https://github.com/keep-network/tbtc.js/pull/89, an UTXO error would occur occasionally and not sometimes not surface to the UI. This was due to the error arising during the restoreState saga in the finalCalls logic, which was not wrapped in any try/catch blocks.
In addition to adding error handling to restoreState, this removes the finalCalls logic and moves that to the onStateRestored saga.
Any error caused by state restoration is now tracked in the redux state and is shown either in the <Loadable> component or any relevant view that is wrapped in <Loadable>. We pass the error to the child views, because the view is revealed before the restoreState saga totally completes.
This adds error handling to the deposit
restoreState
saga. Before https://github.com/keep-network/tbtc.js/pull/89, an UTXO error would occur occasionally and not sometimes not surface to the UI. This was due to the error arising during therestoreState
saga in thefinalCalls
logic, which was not wrapped in any try/catch blocks.In addition to adding error handling to
restoreState
, this removes thefinalCalls
logic and moves that to theonStateRestored
saga.Any error caused by state restoration is now tracked in the redux state and is shown either in the
<Loadable>
component or any relevant view that is wrapped in<Loadable>
. We pass the error to the child views, because the view is revealed before therestoreState
saga totally completes.