diff --git a/lib/services/mixins/fusion_wallet_interface.dart b/lib/services/mixins/fusion_wallet_interface.dart index 8815cbab4..0a14b55fa 100644 --- a/lib/services/mixins/fusion_wallet_interface.dart +++ b/lib/services/mixins/fusion_wallet_interface.dart @@ -318,6 +318,26 @@ mixin FusionWalletInterface { broadcastTransaction: (String txHex) => _getWalletCachedElectrumX() .electrumXClient .broadcastTransaction(rawTx: txHex), + unReserveAddresses: (List addresses) async { + final List> futures = []; + for (final addr in addresses) { + futures.add( + _db.getAddress(_walletId, addr.address).then( + (address) async { + if (address == null) { + // matching address not found in db so cannot mark as unreserved + // just ignore I guess. Should never actually happen in practice. + // Might be useful check in debugging cases? + return; + } else { + await _unReserveAddress(address); + } + }, + ), + ); + } + await Future.wait(futures); + }, ); // Add unfrozen stack UTXOs.