Add fillAmount parameter

This commit is contained in:
Leonid Logvinov 2017-05-30 12:55:42 +02:00
parent 968df3424c
commit 766d46041e
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4

View File

@ -49,7 +49,8 @@ export class ExchangeWrapper extends ContractWrapper {
); );
return isValidSignature; return isValidSignature;
} }
public async fillOrderAsync(signedOrder: SignedOrder, shouldCheckTransfer: boolean = true) { public async fillOrderAsync(signedOrder: SignedOrder, fillAmount: BigNumber.BigNumber,
shouldCheckTransfer: boolean = true): Promise<ContractResponse> {
assert.doesConformToSchema('signedOrder', JSON.parse(JSON.stringify(signedOrder)), signedOrderSchema); assert.doesConformToSchema('signedOrder', JSON.parse(JSON.stringify(signedOrder)), signedOrderSchema);
assert.isBoolean('shouldCheckTransfer', shouldCheckTransfer); assert.isBoolean('shouldCheckTransfer', shouldCheckTransfer);
@ -76,7 +77,7 @@ export class ExchangeWrapper extends ContractWrapper {
const response: ContractResponse = await exchangeInstance.fill( const response: ContractResponse = await exchangeInstance.fill(
orderAddresses, orderAddresses,
orderValues, orderValues,
signedOrder.fillAmount, fillAmount,
shouldCheckTransfer, shouldCheckTransfer,
signedOrder.ecSignature.v, signedOrder.ecSignature.v,
signedOrder.ecSignature.r, signedOrder.ecSignature.r,