mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-04 14:53:08 +00:00
Remove Buffer from getSizeOfPayloadSizeField
This commit is contained in:
parent
9e09de831f
commit
95485f0a69
@ -110,8 +110,8 @@ export function clearDecode(
|
||||
}
|
||||
|
||||
function getSizeOfPayloadSizeField(message: Uint8Array): number {
|
||||
const buf = Buffer.from(message);
|
||||
return buf.readUIntLE(0, 1) & FlagMask;
|
||||
const messageDataView = new DataView(message.buffer);
|
||||
return messageDataView.getUint8(0) & FlagMask;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user