Skip to content

Commit

Permalink
fix: adjust types
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Mar 12, 2024
1 parent bbd7010 commit ca498c0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,16 @@ export class MessageV1 extends MessageBase implements proto.MessageV1 {
export class MessageV2 extends MessageBase implements proto.MessageV2 {
senderAddress: string | undefined
private header: proto.MessageHeaderV2
senderHmac: Uint8Array
shouldPush: boolean
senderHmac?: Uint8Array
shouldPush?: boolean

constructor(
id: string,
bytes: Uint8Array,
obj: proto.Message,
header: proto.MessageHeaderV2,
senderHmac: Uint8Array,
shouldPush: boolean
senderHmac?: Uint8Array,
shouldPush?: boolean
) {
super(id, bytes, obj)
this.header = header
Expand All @@ -210,8 +210,8 @@ export class MessageV2 extends MessageBase implements proto.MessageV2 {
obj: proto.Message,
header: proto.MessageHeaderV2,
bytes: Uint8Array,
senderHmac: Uint8Array,
shouldPush: boolean
senderHmac?: Uint8Array,
shouldPush?: boolean
): Promise<MessageV2> {
const id = bytesToHex(await sha256(bytes))

Expand Down

0 comments on commit ca498c0

Please sign in to comment.