chore: fix encoder/decoder creation (#1742)

* fix encoder creation

* bump nwaku to v0.22.0 (#1741)
This commit is contained in:
Danish Arora 2023-11-29 17:30:56 +05:30 committed by GitHub
parent 4d19fc7b75
commit 7ce642c2cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -128,7 +128,7 @@ export function createEncoder({
return new Encoder(
contentTopic,
ephemeral,
pubsubTopicShardInfo?.index
pubsubTopicShardInfo
? singleShardInfoToPubsubTopic(pubsubTopicShardInfo)
: DefaultPubsubTopic,
metaSetter
@ -193,7 +193,7 @@ export function createDecoder(
pubsubTopicShardInfo?: SingleShardInfo
): Decoder {
return new Decoder(
pubsubTopicShardInfo?.index
pubsubTopicShardInfo
? singleShardInfoToPubsubTopic(pubsubTopicShardInfo)
: DefaultPubsubTopic,
contentTopic

View File

@ -107,7 +107,7 @@ export function createEncoder({
metaSetter
}: EncoderOptions): Encoder {
return new Encoder(
pubsubTopicShardInfo?.index
pubsubTopicShardInfo
? singleShardInfoToPubsubTopic(pubsubTopicShardInfo)
: DefaultPubsubTopic,
contentTopic,
@ -200,7 +200,7 @@ export function createDecoder(
pubsubTopicShardInfo?: SingleShardInfo
): Decoder {
return new Decoder(
pubsubTopicShardInfo?.index
pubsubTopicShardInfo
? singleShardInfoToPubsubTopic(pubsubTopicShardInfo)
: DefaultPubsubTopic,
contentTopic,

View File

@ -107,7 +107,7 @@ export function createEncoder({
metaSetter
}: EncoderOptions): Encoder {
return new Encoder(
pubsubTopicShardInfo?.index
pubsubTopicShardInfo
? singleShardInfoToPubsubTopic(pubsubTopicShardInfo)
: DefaultPubsubTopic,
contentTopic,
@ -200,7 +200,7 @@ export function createDecoder(
pubsubTopicShardInfo?: SingleShardInfo
): Decoder {
return new Decoder(
pubsubTopicShardInfo?.index
pubsubTopicShardInfo
? singleShardInfoToPubsubTopic(pubsubTopicShardInfo)
: DefaultPubsubTopic,
contentTopic,