fixed typo
This commit is contained in:
parent
d831e559f0
commit
f3539bf448
@ -20,7 +20,7 @@ export class DynamicBytesDataType extends AbstractBlobDataType {
|
||||
return;
|
||||
}
|
||||
if (!_.startsWith(value, '0x')) {
|
||||
throw new Error(`Tried to encode non-hex value. Value must inlcude '0x' prefix.`);
|
||||
throw new Error(`Tried to encode non-hex value. Value must include '0x' prefix.`);
|
||||
} else if (value.length % 2 !== 0) {
|
||||
throw new Error(`Tried to assign ${value}, which is contains a half-byte. Use full bytes only.`);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ export class StaticBytesDataType extends AbstractBlobDataType {
|
||||
private _sanityCheckValue(value: string | Buffer): void {
|
||||
if (typeof value === 'string') {
|
||||
if (!_.startsWith(value, '0x')) {
|
||||
throw new Error(`Tried to encode non-hex value. Value must inlcude '0x' prefix.`);
|
||||
throw new Error(`Tried to encode non-hex value. Value must include '0x' prefix.`);
|
||||
} else if (value.length % 2 !== 0) {
|
||||
throw new Error(`Tried to assign ${value}, which is contains a half-byte. Use full bytes only.`);
|
||||
}
|
||||
|
@ -1121,7 +1121,7 @@ describe('ABI Encoder: EVM Data Type Encoding/Decoding', () => {
|
||||
// Encode Args and validate result
|
||||
expect(() => {
|
||||
dataType.encode(args, encodingRules);
|
||||
}).to.throw("Tried to encode non-hex value. Value must inlcude '0x' prefix.");
|
||||
}).to.throw("Tried to encode non-hex value. Value must include '0x' prefix.");
|
||||
});
|
||||
it('Should throw when pass in bad hex (include a half-byte)', async () => {
|
||||
// Create DataType object
|
||||
@ -1235,7 +1235,7 @@ describe('ABI Encoder: EVM Data Type Encoding/Decoding', () => {
|
||||
// Encode Args and validate result
|
||||
expect(() => {
|
||||
dataType.encode(args, encodingRules);
|
||||
}).to.throw("Tried to encode non-hex value. Value must inlcude '0x' prefix.");
|
||||
}).to.throw("Tried to encode non-hex value. Value must include '0x' prefix.");
|
||||
});
|
||||
it('Should throw when pass in bad hex (include a half-byte)', async () => {
|
||||
// Create DataType object
|
||||
|
Loading…
x
Reference in New Issue
Block a user