Change the order of params in isValidSignatureAsync to be consistent
This commit is contained in:
parent
8e35923d6e
commit
f75595c6cd
@ -3,17 +3,17 @@ import {Web3Wrapper} from '../web3_wrapper';
|
||||
import {ECSignature, ZeroExError, ExchangeContract} from '../types';
|
||||
import {assert} from '../utils/assert';
|
||||
import {ContractWrapper} from './contract_wrapper';
|
||||
import * as ExchangeArtifacts from '../artifacts/Exchange.json';
|
||||
import * as ExchangeArtifacts from '../../artifacts/Exchange.json';
|
||||
import {ECSignatureSchema} from '../schemas/ec_signature_schema';
|
||||
|
||||
export class ExchangeWrapper extends ContractWrapper {
|
||||
constructor(web3Wrapper: Web3Wrapper) {
|
||||
super(web3Wrapper);
|
||||
}
|
||||
public async isValidSignatureAsync(maker: string, ecSignature: ECSignature, dataHex: string) {
|
||||
assert.isString('maker', maker);
|
||||
assert.doesConformToSchema('ecSignature', ecSignature, ECSignatureSchema);
|
||||
public async isValidSignatureAsync(dataHex: string, ecSignature: ECSignature, maker: string) {
|
||||
assert.isHexString('dataHex', dataHex);
|
||||
assert.doesConformToSchema('ecSignature', ecSignature, ECSignatureSchema);
|
||||
assert.isString('maker', maker);
|
||||
|
||||
const senderAddressIfExists = this.web3Wrapper.getSenderAddressIfExistsAsync();
|
||||
assert.assert(!_.isUndefined(senderAddressIfExists), ZeroExError.USER_HAS_NO_ASSOCIATED_ADDRESSES);
|
||||
|
Loading…
x
Reference in New Issue
Block a user