diff --git a/packages/core/src/lib/message/version_0.ts b/packages/core/src/lib/message/version_0.ts index a67b16a0dc..bb37c50358 100644 --- a/packages/core/src/lib/message/version_0.ts +++ b/packages/core/src/lib/message/version_0.ts @@ -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 diff --git a/packages/message-encryption/src/ecies.ts b/packages/message-encryption/src/ecies.ts index af393cef14..24d7aa0fee 100644 --- a/packages/message-encryption/src/ecies.ts +++ b/packages/message-encryption/src/ecies.ts @@ -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, diff --git a/packages/message-encryption/src/symmetric.ts b/packages/message-encryption/src/symmetric.ts index 37f8a52cb2..9854f5c665 100644 --- a/packages/message-encryption/src/symmetric.ts +++ b/packages/message-encryption/src/symmetric.ts @@ -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,