Skip to content

Commit

Permalink
fix frame decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
arobsn committed Jul 3, 2024
1 parent 324c211 commit 88ead78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ledger-ergo-js",
"version": "0.1.15",
"version": "0.1.16",
"license": "MIT",
"author": "anon-br",
"description": "An Ergo Platform JS Library for communication with Ledger Hardware Wallets.",
Expand Down
4 changes: 2 additions & 2 deletions src/interactions/attestInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,14 @@ export function decodeAttestedFrameResponse(bytes: Buffer): AttestedBoxFrame {
const boxId = hex.encode(bytes.subarray(0, (offset += 32)));
const count = bytes.readUint8(offset++);
const index = bytes.readUint8(offset++);
const amount = bytes.readBigUint64BE(offset).toString();
const amount = bytes.readBigUInt64BE(offset).toString();
offset += 8;
const tokenCount = bytes.readUint8(offset++);
const tokens: Token[] = [];
for (let i = 0; i < tokenCount; i++) {
tokens.push({
id: hex.encode(bytes.subarray(offset, (offset += 32))),
amount: bytes.readBigUint64BE(offset).toString()
amount: bytes.readBigUInt64BE(offset).toString()
});
offset += 8;
}
Expand Down

0 comments on commit 88ead78

Please sign in to comment.