Skip to content

Commit d69d03b

Browse files
authored
Merge pull request #1975 from wakqasahmed/fix-issue-1974
Fixes issue#1974
2 parents bcf1bf8 + 1cd80e5 commit d69d03b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/address.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function fromBase58Check(address) {
4646
// TODO: 4.0.0, move to "toOutputScript"
4747
if (payload.length < 21) throw new TypeError(address + ' is too short');
4848
if (payload.length > 21) throw new TypeError(address + ' is too long');
49-
const version = payload.readUint8(0);
49+
const version = payload.readUInt8(0);
5050
const hash = payload.slice(1);
5151
return { version, hash };
5252
}

test/bufferutils.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ describe('bufferutils', () => {
316316
}
317317
}
318318

319-
it('readUint8', () => {
319+
it('readUInt8', () => {
320320
const values = [0, 1, 0xfe, 0xff];
321321
const buffer = Buffer.from([0, 1, 0xfe, 0xff]);
322322
const bufferReader = new BufferReader(buffer);

ts_src/address.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function fromBase58Check(address: string): Base58CheckResult {
5959
if (payload.length < 21) throw new TypeError(address + ' is too short');
6060
if (payload.length > 21) throw new TypeError(address + ' is too long');
6161

62-
const version = payload.readUint8(0);
62+
const version = payload.readUInt8(0);
6363
const hash = payload.slice(1);
6464

6565
return { version, hash };

0 commit comments

Comments
 (0)