[Error] Offset is outside the bounds of the DataView
valamidev opened this issue · comments
I am getting the following error while Decode this Payload:
ENR.decodeTxt("T1WJc2VjcDI1NmsxoQJbQ9BY7wgWhlf7QvAS0iJWw5L30RQyN8bSQ15Car-v0YRzbmFwwIN0Y3Bfg3VkcF8")
Fail here:
export function getProtocolValue(kvs, key) {
const raw = kvs.get(key);
if (raw) {
const view = new DataView(raw.buffer, raw.byteOffset, raw.byteLength);
return view.getUint16(0);
}
else {
return undefined;
}
}