diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-08 00:10:56 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-08 00:10:56 +0800 |
commit | dee0fec9e9521712d11f1f040ae1264c41badaba (patch) | |
tree | d62b98046277877125c476fadf0b5a7dd4f052a2 /packages/order-utils | |
parent | 73cc2a140c778a5396c2766562a3fc648337e18a (diff) | |
download | dexon-0x-contracts-dee0fec9e9521712d11f1f040ae1264c41badaba.tar dexon-0x-contracts-dee0fec9e9521712d11f1f040ae1264c41badaba.tar.gz dexon-0x-contracts-dee0fec9e9521712d11f1f040ae1264c41badaba.tar.bz2 dexon-0x-contracts-dee0fec9e9521712d11f1f040ae1264c41badaba.tar.lz dexon-0x-contracts-dee0fec9e9521712d11f1f040ae1264c41badaba.tar.xz dexon-0x-contracts-dee0fec9e9521712d11f1f040ae1264c41badaba.tar.zst dexon-0x-contracts-dee0fec9e9521712d11f1f040ae1264c41badaba.zip |
Revert to returning orderState on invalid order
Diffstat (limited to 'packages/order-utils')
-rw-r--r-- | packages/order-utils/src/order_state_utils.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/order-utils/src/order_state_utils.ts b/packages/order-utils/src/order_state_utils.ts index 7636372f8..ef868e60f 100644 --- a/packages/order-utils/src/order_state_utils.ts +++ b/packages/order-utils/src/order_state_utils.ts @@ -69,7 +69,12 @@ export class OrderStateUtils { }; return orderState; } catch (err) { - throw err; + const orderState: OrderStateInvalid = { + isValid: false, + orderHash, + error: err.message, + }; + return orderState; } } public async getOrderRelevantStateAsync(signedOrder: SignedOrder): Promise<OrderRelevantState> { |