@@ -21,7 +21,7 @@ import { LightPushCodec, WakuLightPush } from "./waku_light_push";
2121import { DecryptionMethod , WakuMessage } from "./waku_message" ;
2222import { RelayCodecs , WakuRelay } from "./waku_relay" ;
2323import { RelayPingContentTopic } from "./waku_relay/constants" ;
24- import { StoreCodec , WakuStore } from "./waku_store" ;
24+ import { StoreCodecs , WakuStore } from "./waku_store" ;
2525
2626const websocketsTransportKey = Websockets . prototype [ Symbol . toStringTag ] ;
2727
@@ -246,7 +246,9 @@ export class Waku {
246246 RelayCodecs . forEach ( ( codec ) => codecs . push ( codec ) ) ;
247247 }
248248 if ( _protocols . includes ( Protocols . Store ) ) {
249- codecs . push ( StoreCodec ) ;
249+ for ( const codec of Object . values ( StoreCodecs ) ) {
250+ codecs . push ( codec ) ;
251+ }
250252 }
251253 if ( _protocols . includes ( Protocols . LightPush ) ) {
252254 codecs . push ( LightPushCodec ) ;
@@ -364,9 +366,11 @@ export class Waku {
364366 this . libp2p . peerStore . on (
365367 "change:protocols" ,
366368 ( { protocols : connectedPeerProtocols } ) => {
367- if ( connectedPeerProtocols . includes ( StoreCodec ) ) {
368- dbg ( "Resolving for" , StoreCodec , connectedPeerProtocols ) ;
369- resolve ( ) ;
369+ for ( const codec of Object . values ( StoreCodecs ) ) {
370+ if ( connectedPeerProtocols . includes ( codec ) ) {
371+ dbg ( "Resolving for" , codec , connectedPeerProtocols ) ;
372+ resolve ( ) ;
373+ }
370374 }
371375 }
372376 ) ;
0 commit comments