Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
hysz committed May 8, 2019
1 parent d831e55 commit f3539bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.`);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/utils/test/abi_encoder/evm_data_types_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f3539bf

Please sign in to comment.