aboutsummaryrefslogtreecommitdiffstats
path: root/packages/asset-buyer/src/utils
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-11-02 06:01:05 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-11-02 06:01:05 +0800
commit32de4862ba94223258f7a08da6373313c9e28f8b (patch)
treeae9598e85afa7ea5bb5ee819f987cab3cff72ceb /packages/asset-buyer/src/utils
parent8c336925601127c759ad4cfbca119368a2edfd56 (diff)
parent0955feb0234bc90b7dcf5ad3a308570c9fa5d490 (diff)
downloaddexon-sol-tools-32de4862ba94223258f7a08da6373313c9e28f8b.tar
dexon-sol-tools-32de4862ba94223258f7a08da6373313c9e28f8b.tar.gz
dexon-sol-tools-32de4862ba94223258f7a08da6373313c9e28f8b.tar.bz2
dexon-sol-tools-32de4862ba94223258f7a08da6373313c9e28f8b.tar.lz
dexon-sol-tools-32de4862ba94223258f7a08da6373313c9e28f8b.tar.xz
dexon-sol-tools-32de4862ba94223258f7a08da6373313c9e28f8b.tar.zst
dexon-sol-tools-32de4862ba94223258f7a08da6373313c9e28f8b.zip
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/token-selection-panel
Diffstat (limited to 'packages/asset-buyer/src/utils')
-rw-r--r--packages/asset-buyer/src/utils/assert.ts16
1 files changed, 0 insertions, 16 deletions
diff --git a/packages/asset-buyer/src/utils/assert.ts b/packages/asset-buyer/src/utils/assert.ts
index e5bfd2d81..2466f53a4 100644
--- a/packages/asset-buyer/src/utils/assert.ts
+++ b/packages/asset-buyer/src/utils/assert.ts
@@ -1,6 +1,5 @@
import { assert as sharedAssert } from '@0x/assert';
import { schemas } from '@0x/json-schemas';
-import { SignedOrder } from '@0x/types';
import * as _ from 'lodash';
import { BuyQuote, BuyQuoteInfo, OrderProvider, OrderProviderRequest } from '../types';
@@ -30,21 +29,6 @@ export const assert = {
sharedAssert.isHexString(`${variableName}.makerAssetData`, orderFetcherRequest.makerAssetData);
sharedAssert.isHexString(`${variableName}.takerAssetData`, orderFetcherRequest.takerAssetData);
},
- areValidProvidedOrders(variableName: string, orders: SignedOrder[]): void {
- if (orders.length === 0) {
- return;
- }
- const makerAssetData = orders[0].makerAssetData;
- const takerAssetData = orders[0].takerAssetData;
- const filteredOrders = _.filter(
- orders,
- order => order.makerAssetData === makerAssetData && order.takerAssetData === takerAssetData,
- );
- sharedAssert.assert(
- orders.length === filteredOrders.length,
- `Expected all orders in ${variableName} to have the same makerAssetData and takerAssetData.`,
- );
- },
isValidPercentage(variableName: string, percentage: number): void {
assert.isNumber(variableName, percentage);
assert.assert(