mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
rename variable
This commit is contained in:
parent
eea8199582
commit
363ec75b42
1 changed files with 5 additions and 5 deletions
|
|
@ -29,11 +29,11 @@ class Advert {
|
||||||
const packet = Packet.fromBytes(bytes);
|
const packet = Packet.fromBytes(bytes);
|
||||||
|
|
||||||
// read packet payload
|
// read packet payload
|
||||||
const bufferedReader = new BufferReader(packet.payload);
|
const bufferReader = new BufferReader(packet.payload);
|
||||||
const publicKey = bufferedReader.readBytes(32);
|
const publicKey = bufferReader.readBytes(32);
|
||||||
const timestamp = bufferedReader.readBytes(4); // read as bytes for signature
|
const timestamp = bufferReader.readBytes(4); // read as bytes for signature
|
||||||
const signature = bufferedReader.readBytes(64);
|
const signature = bufferReader.readBytes(64);
|
||||||
const appData = bufferedReader.readRemainingBytes();
|
const appData = bufferReader.readRemainingBytes();
|
||||||
|
|
||||||
return new Advert(publicKey, timestamp, signature, appData);
|
return new Advert(publicKey, timestamp, signature, appData);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue