Skip to content

Commit 89cbd69

Browse files
committed
small fixes after review
1 parent 5a7e630 commit 89cbd69

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/abi/codec/managedDecimal.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ export class ManagedDecimalCodec {
1313

1414
decodeNested(buffer: Buffer, type: ManagedDecimalType): [ManagedDecimalValue, number] {
1515
let payload: Buffer;
16-
let length: number = 0;
16+
let length: number;
1717

1818
if (type.isVariable()) {
19-
// read biguint value length
19+
// read BigUInt value length
2020
const bigUintSizeBytes = buffer.slice(0, SizeOfU32);
2121
const bigUintLength = bigUintSizeBytes.readUInt32BE(0);
2222

src/abi/codec/managedDecimalSigned.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ export class ManagedDecimalSignedCodec {
1313

1414
decodeNested(buffer: Buffer, type: ManagedDecimalSignedType): [ManagedDecimalSignedValue, number] {
1515
let payload: Buffer;
16-
let length: number = 0;
16+
let length: number;
1717

1818
if (type.isVariable()) {
19-
// read biguint value length
20-
const bigUintSizeBytes = buffer.slice(0, SizeOfU32);
21-
const bigUintLength = bigUintSizeBytes.readUInt32BE(0);
19+
// read BigInt value length
20+
const bigIntSizeBytes = buffer.slice(0, SizeOfU32);
21+
const bigIntLength = bigIntSizeBytes.readUInt32BE(0);
2222

23-
length = SizeOfU32 + bigUintLength + SizeOfU32;
23+
length = SizeOfU32 + bigIntLength + SizeOfU32;
2424
payload = buffer.slice(0, length);
2525
} else {
2626
length = buffer.readUInt32BE(0);

0 commit comments

Comments
 (0)