Merge pull request #899 from kroitor/patch-1

Deduplicate assert web3-wrapper signMessageAsync
This commit is contained in:
Amir Bandeali 2018-07-20 20:28:29 -07:00 committed by GitHub
commit bf69ca6e53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -291,7 +291,6 @@ export class Web3Wrapper {
* @returns Signature string (might be VRS or RSV depending on the Signer) * @returns Signature string (might be VRS or RSV depending on the Signer)
*/ */
public async signMessageAsync(address: string, message: string): Promise<string> { public async signMessageAsync(address: string, message: string): Promise<string> {
assert.isETHAddressHex('address', address);
assert.isETHAddressHex('address', address); assert.isETHAddressHex('address', address);
assert.isString('message', message); // TODO: Should this be stricter? Hex string? assert.isString('message', message); // TODO: Should this be stricter? Hex string?
const signData = await this._sendRawPayloadAsync<string>({ const signData = await this._sendRawPayloadAsync<string>({