@btc-vision/btc-runtime 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -56,8 +56,6 @@ export class BytesReader {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
public readBytes(length: u32, zeroStop: boolean = false): Uint8Array {
|
|
59
|
-
this.verifyEnd(this.currentOffset + length);
|
|
60
|
-
|
|
61
59
|
let bytes: Uint8Array = new Uint8Array(length);
|
|
62
60
|
for (let i: u32 = 0; i < length; i++) {
|
|
63
61
|
const byte: u8 = this.readU8();
|
|
@@ -312,17 +312,13 @@ export class BytesWriter {
|
|
|
312
312
|
throw new Revert(`Address is too long ${value.length} > ${ADDRESS_BYTE_LENGTH} bytes`);
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
const bytes: Uint8Array = new Uint8Array(
|
|
315
|
+
const bytes: Uint8Array = new Uint8Array(value.length + 1);
|
|
316
316
|
for (let i: i32 = 0; i < value.length; i++) {
|
|
317
317
|
bytes[i] = value.charCodeAt(i);
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
bytes[bytes.length] = 0;
|
|
321
321
|
|
|
322
|
-
//for (let i: u8 = u8(value.length); i < ADDRESS_BYTE_LENGTH; i++) {
|
|
323
|
-
// bytes[i] = 0;
|
|
324
|
-
//}
|
|
325
|
-
|
|
326
322
|
return bytes;
|
|
327
323
|
}
|
|
328
324
|
|