Rename method for clarity
This commit is contained in:
@@ -260,7 +260,7 @@ export class ZeroEx {
|
|||||||
msgHashHex = ethUtil.bufferToHex(msgHashBuff);
|
msgHashHex = ethUtil.bufferToHex(msgHashBuff);
|
||||||
}
|
}
|
||||||
|
|
||||||
const signature = await this._web3Wrapper.signTransactionAsync(normalizedSignerAddress, msgHashHex);
|
const signature = await this._web3Wrapper.signMessageAsync(normalizedSignerAddress, msgHashHex);
|
||||||
|
|
||||||
// HACK: There is no consensus on whether the signatureHex string should be formatted as
|
// HACK: There is no consensus on whether the signatureHex string should be formatted as
|
||||||
// v + r + s OR r + s + v, and different clients (even different versions of the same client)
|
// v + r + s OR r + s + v, and different clients (even different versions of the same client)
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export class Web3Wrapper {
|
|||||||
const codeIsEmpty = /^0x0{0,40}$/i.test(code);
|
const codeIsEmpty = /^0x0{0,40}$/i.test(code);
|
||||||
return !codeIsEmpty;
|
return !codeIsEmpty;
|
||||||
}
|
}
|
||||||
public async signTransactionAsync(address: string, message: string): Promise<string> {
|
public async signMessageAsync(address: string, message: string): Promise<string> {
|
||||||
const signData = await promisify<string>(this._web3.eth.sign)(address, message);
|
const signData = await promisify<string>(this._web3.eth.sign)(address, message);
|
||||||
return signData;
|
return signData;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user