Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check swap-in wallet at each block (#515)
The `WalletState` class contains absolute blockheights for utxos, and does not contain the current block height, so it is constant as soon as an utxo confirms. Even if `ElectrumMiniWallet` explicitly updated `_walletStateFlow` (which it doesn't), it would be ignored because `MutableStateFlow` deduplicates events. We need to look for swap-ins when either the wallet state or the current blockheight changes, otherwise we will only call `TrySwapIn` when the utxo reaches `weak` confirmation, and not when it graduates from `weak` to `deep` confirmation.
- Loading branch information