@@ -201,7 +201,7 @@ export class Listener {
201201 share ( ) ,
202202 filter ( ( _ ) => _ . channelName === ListenerChannelName . block ) ,
203203 filter ( ( _ ) => _ . message instanceof BlockInfo ) ,
204- map ( ( _ ) => _ . message as BlockInfo ) , ) ;
204+ map ( ( _ ) => _ . message as BlockInfo ) ) ;
205205 }
206206
207207 /**
@@ -218,7 +218,7 @@ export class Listener {
218218 filter ( ( _ ) => _ . channelName === ListenerChannelName . confirmedAdded ) ,
219219 filter ( ( _ ) => _ . message instanceof Transaction ) ,
220220 map ( ( _ ) => _ . message as Transaction ) ,
221- filter ( ( _ ) => this . transactionFromAddress ( _ , address ) ) , ) ;
221+ filter ( ( _ ) => this . transactionFromAddress ( _ , address ) ) ) ;
222222 }
223223
224224 /**
@@ -235,7 +235,7 @@ export class Listener {
235235 filter ( ( _ ) => _ . channelName === ListenerChannelName . unconfirmedAdded ) ,
236236 filter ( ( _ ) => _ . message instanceof Transaction ) ,
237237 map ( ( _ ) => _ . message as Transaction ) ,
238- filter ( ( _ ) => this . transactionFromAddress ( _ , address ) ) , ) ;
238+ filter ( ( _ ) => this . transactionFromAddress ( _ , address ) ) ) ;
239239 }
240240
241241 /**
@@ -251,7 +251,7 @@ export class Listener {
251251 return this . messageSubject . asObservable ( ) . pipe (
252252 filter ( ( _ ) => _ . channelName === ListenerChannelName . unconfirmedRemoved ) ,
253253 filter ( ( _ ) => typeof _ . message === 'string' ) ,
254- map ( ( _ ) => _ . message as string ) , ) ;
254+ map ( ( _ ) => _ . message as string ) ) ;
255255 }
256256
257257 /**
@@ -268,7 +268,7 @@ export class Listener {
268268 filter ( ( _ ) => _ . channelName === ListenerChannelName . aggregateBondedAdded ) ,
269269 filter ( ( _ ) => _ . message instanceof AggregateTransaction ) ,
270270 map ( ( _ ) => _ . message as AggregateTransaction ) ,
271- filter ( ( _ ) => this . transactionFromAddress ( _ , address ) ) , ) ;
271+ filter ( ( _ ) => this . transactionFromAddress ( _ , address ) ) ) ;
272272 }
273273
274274 /**
@@ -284,7 +284,7 @@ export class Listener {
284284 return this . messageSubject . asObservable ( ) . pipe (
285285 filter ( ( _ ) => _ . channelName === ListenerChannelName . aggregateBondedRemoved ) ,
286286 filter ( ( _ ) => typeof _ . message === 'string' ) ,
287- map ( ( _ ) => _ . message as string ) , ) ;
287+ map ( ( _ ) => _ . message as string ) ) ;
288288 }
289289
290290 /**
@@ -300,7 +300,7 @@ export class Listener {
300300 return this . messageSubject . asObservable ( ) . pipe (
301301 filter ( ( _ ) => _ . channelName === ListenerChannelName . status ) ,
302302 filter ( ( _ ) => _ . message instanceof TransactionStatusError ) ,
303- map ( ( _ ) => _ . message as TransactionStatusError ) , ) ;
303+ map ( ( _ ) => _ . message as TransactionStatusError ) ) ;
304304 }
305305
306306 /**
@@ -316,7 +316,7 @@ export class Listener {
316316 return this . messageSubject . asObservable ( ) . pipe (
317317 filter ( ( _ ) => _ . channelName === ListenerChannelName . cosignature ) ,
318318 filter ( ( _ ) => _ . message instanceof CosignatureSignedTransaction ) ,
319- map ( ( _ ) => _ . message as CosignatureSignedTransaction ) , ) ;
319+ map ( ( _ ) => _ . message as CosignatureSignedTransaction ) ) ;
320320 }
321321
322322 /**
@@ -332,6 +332,18 @@ export class Listener {
332332 this . webSocket . send ( JSON . stringify ( subscriptionMessage ) ) ;
333333 }
334334
335+ /**
336+ * @internal
337+ * @param channel - Channel to unsubscribe
338+ */
339+ private unsubscribeTo ( channel : string ) {
340+ const unsubscribeMessage = {
341+ uid : this . uid ,
342+ unsubscribe : channel ,
343+ } ;
344+ this . webSocket . send ( JSON . stringify ( unsubscribeMessage ) ) ;
345+ }
346+
335347 /**
336348 * @internal
337349 * Filters if a transaction has been initiated or signed by an address
0 commit comments