Include variableName in error message for checksummed address

This commit is contained in:
Leonid Logvinov
2017-08-22 11:10:54 +02:00
parent c10a2d4fe4
commit 40f4ccd888

View File

@@ -26,7 +26,7 @@ export const assert = {
this.assert(web3.isAddress(value), this.typeAssertionMessage(variableName, 'ETHAddressHex', value));
this.assert(
web3.isAddress(value) && !web3.isChecksumAddress(value),
'Checksummed addresses are not supported. Convert to lower case before passing',
`Checksummed addresses are not supported. Convert ${variableName} to lower case before passing`,
);
},
doesBelongToStringEnum(variableName: string, value: string,