mirror of https://github.com/status-im/js-waku.git
fix: usage of libp2p and undefined options
This commit is contained in:
parent
52d74a74b5
commit
d609b9c47b
|
@ -91,7 +91,7 @@ export async function createWaku(options?: CreateOptions): Promise<Waku> {
|
|||
|
||||
// TODO: Use options
|
||||
const libp2pOpts = {
|
||||
transports: new WebSockets({ filter: filterAll }),
|
||||
transports: [new WebSockets({ filter: filterAll })],
|
||||
streamMuxers: [new Mplex()],
|
||||
pubsub: new WakuRelay(),
|
||||
connectionEncryption: [new Noise()],
|
||||
|
|
|
@ -44,13 +44,12 @@ export class WakuRelay extends GossipSub {
|
|||
};
|
||||
|
||||
constructor(options?: Partial<CreateOptions & GossipsubOpts>) {
|
||||
super(
|
||||
Object.assign(options, {
|
||||
// Ensure that no signature is included nor expected in the messages.
|
||||
globalSignaturePolicy: SignaturePolicy.StrictNoSign,
|
||||
fallbackToFloodsub: false,
|
||||
})
|
||||
);
|
||||
options = Object.assign(options ?? {}, {
|
||||
// Ensure that no signature is included nor expected in the messages.
|
||||
globalSignaturePolicy: SignaturePolicy.StrictNoSign,
|
||||
fallbackToFloodsub: false,
|
||||
});
|
||||
super(options);
|
||||
this.multicodecs = constants.RelayCodecs;
|
||||
|
||||
this.observers = {};
|
||||
|
|
Loading…
Reference in New Issue