Fix validateOrderFillableOrThrowAsync method so it also checks order signature, cancelled, cancelledUpTo, and throws helpful error messages

This commit is contained in:
Fabio Berger
2018-11-09 00:45:48 +01:00
parent 8b06b36274
commit 857a35d4f7
12 changed files with 94 additions and 30 deletions

View File

@@ -1,3 +1,4 @@
import { SignedOrder } from '@0x/types';
import { BigNumber } from '@0x/utils';
import * as chai from 'chai';
import 'mocha';
@@ -33,7 +34,7 @@ describe('OrderStateUtils', () => {
async getFilledTakerAmountAsync(_orderHash: string): Promise<BigNumber> {
return filledAmount;
},
async isOrderCancelledAsync(_orderHash: string): Promise<boolean> {
async isOrderCancelledAsync(_signedOrder: SignedOrder): Promise<boolean> {
return cancelled;
},
getZRXAssetData(): string {