Skip to content

Commit

Permalink
Merge pull request #1975 from wakqasahmed/fix-issue-1974
Browse files Browse the repository at this point in the history
Fixes issue#1974
  • Loading branch information
junderw authored Sep 14, 2023
2 parents bcf1bf8 + 1cd80e5 commit d69d03b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function fromBase58Check(address) {
// TODO: 4.0.0, move to "toOutputScript"
if (payload.length < 21) throw new TypeError(address + ' is too short');
if (payload.length > 21) throw new TypeError(address + ' is too long');
const version = payload.readUint8(0);
const version = payload.readUInt8(0);
const hash = payload.slice(1);
return { version, hash };
}
Expand Down
2 changes: 1 addition & 1 deletion test/bufferutils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ describe('bufferutils', () => {
}
}

it('readUint8', () => {
it('readUInt8', () => {
const values = [0, 1, 0xfe, 0xff];
const buffer = Buffer.from([0, 1, 0xfe, 0xff]);
const bufferReader = new BufferReader(buffer);
Expand Down
2 changes: 1 addition & 1 deletion ts_src/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function fromBase58Check(address: string): Base58CheckResult {
if (payload.length < 21) throw new TypeError(address + ' is too short');
if (payload.length > 21) throw new TypeError(address + ' is too long');

const version = payload.readUint8(0);
const version = payload.readUInt8(0);
const hash = payload.slice(1);

return { version, hash };
Expand Down

0 comments on commit d69d03b

Please sign in to comment.