Skip to content

Normalizes messages by ensuring they have the proper structure. Because the current and other code doesn't support Msgs with optional / empty fields, we need…

normalizeMessagesIfNecessary(messages): MessageGenerated<AnyMessage>[]

Defined in: packages/bitbadgesjs-sdk/src/transactions/messages/utils.ts:29

Normalizes messages by ensuring they have the proper structure. Because the current and other code doesn't support Msgs with optional / empty fields, we need to populate undefined fields with empty default values.

Parameters

messages

MessageGenerated<AnyMessage>[]

Returns

MessageGenerated<AnyMessage>[]

Edit this page on GitHub