only assign subscription if null

This commit is contained in:
sneurlax 2024-02-06 20:46:33 -06:00
parent 469ab91dfd
commit 3d42967c8b

View file

@ -843,7 +843,7 @@ mixin ElectrumXInterface<T extends Bip39HDCurrency> on Bip39HDWallet<T> {
subscribableElectrumXClient.subscribeToBlockHeaders();
// set stream subscription
ElectrumxChainHeightService.subscriptions[cryptoCurrency.coin] =
ElectrumxChainHeightService.subscriptions[cryptoCurrency.coin] ??=
subscription.responseStream.asBroadcastStream().listen((event) {
final response = event;
if (response != null &&