aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-08 00:10:56 +0800
committerFabio Berger <me@fabioberger.com>2018-06-08 00:10:56 +0800
commitdee0fec9e9521712d11f1f040ae1264c41badaba (patch)
treed62b98046277877125c476fadf0b5a7dd4f052a2
parent73cc2a140c778a5396c2766562a3fc648337e18a (diff)
downloaddexon-sol-tools-dee0fec9e9521712d11f1f040ae1264c41badaba.tar
dexon-sol-tools-dee0fec9e9521712d11f1f040ae1264c41badaba.tar.gz
dexon-sol-tools-dee0fec9e9521712d11f1f040ae1264c41badaba.tar.bz2
dexon-sol-tools-dee0fec9e9521712d11f1f040ae1264c41badaba.tar.lz
dexon-sol-tools-dee0fec9e9521712d11f1f040ae1264c41badaba.tar.xz
dexon-sol-tools-dee0fec9e9521712d11f1f040ae1264c41badaba.tar.zst
dexon-sol-tools-dee0fec9e9521712d11f1f040ae1264c41badaba.zip
Revert to returning orderState on invalid order
-rw-r--r--packages/order-utils/src/order_state_utils.ts7
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> {