aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ts/contract_wrappers/exchange_wrapper.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ts/contract_wrappers/exchange_wrapper.ts b/src/ts/contract_wrappers/exchange_wrapper.ts
index 5a576a7fa..b02390eba 100644
--- a/src/ts/contract_wrappers/exchange_wrapper.ts
+++ b/src/ts/contract_wrappers/exchange_wrapper.ts
@@ -10,20 +10,21 @@ export class ExchangeWrapper extends ContractWrapper {
constructor(web3Wrapper: Web3Wrapper) {
super(web3Wrapper);
}
- public async isValidSignatureAsync(dataHex: string, ecSignature: ECSignature, maker: string) {
+ public async isValidSignatureAsync(dataHex: string, ecSignature: ECSignature,
+ signerAddressHex: string): Promise<boolean> {
assert.isHexString('dataHex', dataHex);
assert.doesConformToSchema('ecSignature', ecSignature, ECSignatureSchema);
- assert.isString('maker', maker);
+ assert.isETHAddressHex('signerAddressHex', signerAddressHex);
- const senderAddressIfExists = this.web3Wrapper.getSenderAddressIfExistsAsync();
+ const senderAddressIfExists = await this.web3Wrapper.getSenderAddressIfExistsAsync();
assert.assert(!_.isUndefined(senderAddressIfExists), ZeroExError.USER_HAS_NO_ASSOCIATED_ADDRESSES);
- // TODO: remove any here
+ // TODO: remove `any` here
const contractInstance = await this.instantiateContractIfExistsAsync((ExchangeArtifacts as any));
const exchangeInstance = contractInstance as ExchangeContract;
const isValidSignature = await exchangeInstance.isValidSignature.call(
- maker,
+ signerAddressHex,
dataHex,
ecSignature.v,
ecSignature.r,