aboutsummaryrefslogtreecommitdiffstats
path: root/packages/connect/test/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'packages/connect/test/fixtures')
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/asset_pairs.json21
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/asset_pairs.ts25
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/fee_recipients.json10
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/fee_recipients.ts12
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/fees.json5
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/fees.ts9
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json34
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.ts32
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/order_config.json6
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/order_config.ts10
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/orderbook.json90
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/orderbook.ts94
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/orders.json45
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/orders.ts47
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/snapshot_orderbook_channel_message.ts17
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/token_pairs.json16
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/token_pairs.ts20
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/unknown_orders_channel_message.ts (renamed from packages/connect/test/fixtures/standard_relayer_api/unknown_orderbook_channel_message.ts)6
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/update_orderbook_channel_message.ts17
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/update_orders_channel_message.ts17
20 files changed, 292 insertions, 241 deletions
diff --git a/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.json b/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.json
new file mode 100644
index 000000000..603e9f67e
--- /dev/null
+++ b/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.json
@@ -0,0 +1,21 @@
+{
+ "total": 43,
+ "page": 1,
+ "perPage": 100,
+ "records": [
+ {
+ "assetDataA": {
+ "minAmount": "0",
+ "maxAmount": "10000000000000000000",
+ "precision": 5,
+ "assetData": "0xf47261b04c32345ced77393b3530b1eed0f346429d"
+ },
+ "assetDataB": {
+ "minAmount": "0",
+ "maxAmount": "50000000000000000000",
+ "precision": 5,
+ "assetData": "0x0257179264389b814a946f3e92105513705ca6b990"
+ }
+ }
+ ]
+}
diff --git a/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.ts b/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.ts
new file mode 100644
index 000000000..5ce703317
--- /dev/null
+++ b/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.ts
@@ -0,0 +1,25 @@
+import { BigNumber } from '@0xproject/utils';
+
+import { AssetPairsResponse } from '../../../src/types';
+
+export const assetDataPairsResponse: AssetPairsResponse = {
+ total: 43,
+ page: 1,
+ perPage: 100,
+ records: [
+ {
+ assetDataA: {
+ minAmount: new BigNumber('0'),
+ maxAmount: new BigNumber('10000000000000000000'),
+ precision: 5,
+ assetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d',
+ },
+ assetDataB: {
+ minAmount: new BigNumber('0'),
+ maxAmount: new BigNumber('50000000000000000000'),
+ precision: 5,
+ assetData: '0x0257179264389b814a946f3e92105513705ca6b990',
+ },
+ },
+ ],
+};
diff --git a/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.json b/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.json
new file mode 100644
index 000000000..b1d570b03
--- /dev/null
+++ b/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.json
@@ -0,0 +1,10 @@
+{
+ "total": 3,
+ "page": 1,
+ "perPage": 10,
+ "records": [
+ "0x6ec92694ea172ebc430c30fa31de87620967a082",
+ "0x9e56625509c2f60af937f23b7b532600390e8c8b",
+ "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32"
+ ]
+}
diff --git a/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.ts b/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.ts
new file mode 100644
index 000000000..e17ffe7a8
--- /dev/null
+++ b/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.ts
@@ -0,0 +1,12 @@
+import { FeeRecipientsResponse } from '../../../src/types';
+
+export const feeRecipientsResponse: FeeRecipientsResponse = {
+ total: 3,
+ page: 1,
+ perPage: 10,
+ records: [
+ '0x6ec92694ea172ebc430c30fa31de87620967a082',
+ '0x9e56625509c2f60af937f23b7b532600390e8c8b',
+ '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
+ ],
+};
diff --git a/packages/connect/test/fixtures/standard_relayer_api/fees.json b/packages/connect/test/fixtures/standard_relayer_api/fees.json
deleted file mode 100644
index 483a74254..000000000
--- a/packages/connect/test/fixtures/standard_relayer_api/fees.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "feeRecipient": "0x323b5d4c32345ced77393b3530b1eed0f346429d",
- "makerFee": "10000000000000000",
- "takerFee": "30000000000000000"
-}
diff --git a/packages/connect/test/fixtures/standard_relayer_api/fees.ts b/packages/connect/test/fixtures/standard_relayer_api/fees.ts
deleted file mode 100644
index fecbaacff..000000000
--- a/packages/connect/test/fixtures/standard_relayer_api/fees.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { BigNumber } from '@0xproject/utils';
-
-import { FeesResponse } from '../../../src/types';
-
-export const feesResponse: FeesResponse = {
- feeRecipient: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- makerFee: new BigNumber('10000000000000000'),
- takerFee: new BigNumber('30000000000000000'),
-};
diff --git a/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json b/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json
index e84954b0d..8d2cdd8ed 100644
--- a/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json
+++ b/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json
@@ -1,19 +1,19 @@
{
- "maker": "0x9e56625509c2f60af937f23b7b532600390e8c8b",
- "taker": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32",
- "makerFee": "100000000000000",
- "takerFee": "200000000000000",
- "makerTokenAmount": "10000000000000000",
- "takerTokenAmount": "20000000000000000",
- "makerTokenAddress": "0x323b5d4c32345ced77393b3530b1eed0f346429d",
- "takerTokenAddress": "0xef7fff64389b814a946f3e92105513705ca6b990",
- "salt": "256",
- "feeRecipient": "0xb046140686d052fff581f63f8136cce132e857da",
- "exchangeContractAddress": "0x12459c951127e0c374ff9105dda097662a027093",
- "expirationUnixTimestampSec": "42",
- "ecSignature": {
- "v": 27,
- "r": "0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33",
- "s": "0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254"
- }
+ "order": {
+ "makerAddress": "0x9e56625509c2f60af937f23b7b532600390e8c8b",
+ "takerAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32",
+ "feeRecipientAddress": "0xb046140686d052fff581f63f8136cce132e857da",
+ "senderAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32",
+ "makerAssetAmount": "10000000000000000",
+ "takerAssetAmount": "20000000000000000",
+ "makerFee": "100000000000000",
+ "takerFee": "200000000000000",
+ "expirationTimeSeconds": "1532560590",
+ "salt": "1532559225",
+ "makerAssetData": "0xf47261b04c32345ced77393b3530b1eed0f346429d",
+ "takerAssetData": "0x0257179264389b814a946f3e92105513705ca6b990",
+ "exchangeAddress": "0x12459c951127e0c374ff9105dda097662a027093",
+ "signature": "0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33"
+ },
+ "metaData": {}
}
diff --git a/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.ts b/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.ts
index 5a03a2ff6..c8a669b3b 100644
--- a/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.ts
+++ b/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.ts
@@ -1,21 +1,21 @@
import { BigNumber } from '@0xproject/utils';
export const orderResponse = {
- maker: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
- taker: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- makerFee: new BigNumber('100000000000000'),
- takerFee: new BigNumber('200000000000000'),
- makerTokenAmount: new BigNumber('10000000000000000'),
- takerTokenAmount: new BigNumber('20000000000000000'),
- makerTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- takerTokenAddress: '0xef7fff64389b814a946f3e92105513705ca6b990',
- salt: new BigNumber('256'),
- feeRecipient: '0xb046140686d052fff581f63f8136cce132e857da',
- exchangeContractAddress: '0x12459c951127e0c374ff9105dda097662a027093',
- expirationUnixTimestampSec: new BigNumber('42'),
- ecSignature: {
- v: 27,
- r: '0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33',
- s: '0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254',
+ order: {
+ makerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
+ takerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
+ feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da',
+ senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
+ makerAssetAmount: new BigNumber('10000000000000000'),
+ takerAssetAmount: new BigNumber('20000000000000000'),
+ makerFee: new BigNumber('100000000000000'),
+ takerFee: new BigNumber('200000000000000'),
+ expirationTimeSeconds: new BigNumber('1532560590'),
+ salt: new BigNumber('1532559225'),
+ makerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d',
+ takerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990',
+ exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093',
+ signature: '0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33',
},
+ metaData: {},
};
diff --git a/packages/connect/test/fixtures/standard_relayer_api/order_config.json b/packages/connect/test/fixtures/standard_relayer_api/order_config.json
new file mode 100644
index 000000000..39da91e6d
--- /dev/null
+++ b/packages/connect/test/fixtures/standard_relayer_api/order_config.json
@@ -0,0 +1,6 @@
+{
+ "senderAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32",
+ "feeRecipientAddress": "0xb046140686d052fff581f63f8136cce132e857da",
+ "makerFee": "100000000000000",
+ "takerFee": "200000000000000"
+}
diff --git a/packages/connect/test/fixtures/standard_relayer_api/order_config.ts b/packages/connect/test/fixtures/standard_relayer_api/order_config.ts
new file mode 100644
index 000000000..36f01a009
--- /dev/null
+++ b/packages/connect/test/fixtures/standard_relayer_api/order_config.ts
@@ -0,0 +1,10 @@
+import { BigNumber } from '@0xproject/utils';
+
+import { OrderConfigResponse } from '../../../src/types';
+
+export const orderConfigResponse: OrderConfigResponse = {
+ senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
+ feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da',
+ makerFee: new BigNumber('100000000000000'),
+ takerFee: new BigNumber('200000000000000'),
+};
diff --git a/packages/connect/test/fixtures/standard_relayer_api/orderbook.json b/packages/connect/test/fixtures/standard_relayer_api/orderbook.json
index 825be34c2..5206c2217 100644
--- a/packages/connect/test/fixtures/standard_relayer_api/orderbook.json
+++ b/packages/connect/test/fixtures/standard_relayer_api/orderbook.json
@@ -1,44 +1,54 @@
{
- "bids": [
- {
- "maker": "0x9e56625509c2f60af937f23b7b532600390e8c8b",
- "taker": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32",
- "makerFee": "100000000000000",
- "takerFee": "200000000000000",
- "makerTokenAmount": "10000000000000000",
- "takerTokenAmount": "20000000000000000",
- "makerTokenAddress": "0x323b5d4c32345ced77393b3530b1eed0f346429d",
- "takerTokenAddress": "0xef7fff64389b814a946f3e92105513705ca6b990",
- "salt": "256",
- "feeRecipient": "0xb046140686d052fff581f63f8136cce132e857da",
- "exchangeContractAddress": "0x12459c951127e0c374ff9105dda097662a027093",
- "expirationUnixTimestampSec": "42",
- "ecSignature": {
- "v": 27,
- "r": "0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33",
- "s": "0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254"
+ "bids": {
+ "total": 325,
+ "page": 2,
+ "perPage": 100,
+ "records": [
+ {
+ "order": {
+ "makerAddress": "0x9e56625509c2f60af937f23b7b532600390e8c8b",
+ "takerAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32",
+ "feeRecipientAddress": "0xb046140686d052fff581f63f8136cce132e857da",
+ "senderAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32",
+ "makerAssetAmount": "10000000000000000",
+ "takerAssetAmount": "20000000000000000",
+ "makerFee": "100000000000000",
+ "takerFee": "200000000000000",
+ "expirationTimeSeconds": "1532560590",
+ "salt": "1532559225",
+ "makerAssetData": "0xf47261b04c32345ced77393b3530b1eed0f346429d",
+ "takerAssetData": "0x0257179264389b814a946f3e92105513705ca6b990",
+ "exchangeAddress": "0x12459c951127e0c374ff9105dda097662a027093",
+ "signature": "0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33"
+ },
+ "metaData": {}
}
- }
- ],
- "asks": [
- {
- "maker": "0x9e56625509c2f60af937f23b7b532600390e8c8b",
- "taker": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32",
- "makerFee": "100000000000000",
- "takerFee": "200000000000000",
- "makerTokenAmount": "10000000000000000",
- "takerTokenAmount": "20000000000000000",
- "makerTokenAddress": "0x323b5d4c32345ced77393b3530b1eed0f346429d",
- "takerTokenAddress": "0xef7fff64389b814a946f3e92105513705ca6b990",
- "salt": "256",
- "feeRecipient": "0xb046140686d052fff581f63f8136cce132e857da",
- "exchangeContractAddress": "0x12459c951127e0c374ff9105dda097662a027093",
- "expirationUnixTimestampSec": "42",
- "ecSignature": {
- "v": 27,
- "r": "0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33",
- "s": "0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254"
+ ]
+ },
+ "asks": {
+ "total": 500,
+ "page": 2,
+ "perPage": 100,
+ "records": [
+ {
+ "order": {
+ "makerAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32",
+ "takerAddress": "0x9e56625509c2f60af937f23b7b532600390e8c8b",
+ "feeRecipientAddress": "0xb046140686d052fff581f63f8136cce132e857da",
+ "senderAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32",
+ "makerAssetAmount": "20000000000000000",
+ "takerAssetAmount": "10000000000000000",
+ "makerFee": "200000000000000",
+ "takerFee": "100000000000000",
+ "expirationTimeSeconds": "1532560590",
+ "salt": "1532559225",
+ "makerAssetData": "0x0257179264389b814a946f3e92105513705ca6b990",
+ "takerAssetData": "0xf47261b04c32345ced77393b3530b1eed0f346429d",
+ "exchangeAddress": "0x12459c951127e0c374ff9105dda097662a027093",
+ "signature": "0x013842a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b3518891"
+ },
+ "metaData": {}
}
- }
- ]
+ ]
+ }
}
diff --git a/packages/connect/test/fixtures/standard_relayer_api/orderbook.ts b/packages/connect/test/fixtures/standard_relayer_api/orderbook.ts
index 6684ac2e5..d5f39a51f 100644
--- a/packages/connect/test/fixtures/standard_relayer_api/orderbook.ts
+++ b/packages/connect/test/fixtures/standard_relayer_api/orderbook.ts
@@ -1,46 +1,58 @@
import { BigNumber } from '@0xproject/utils';
-export const orderbookResponse = {
- bids: [
- {
- maker: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
- taker: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- makerFee: new BigNumber('100000000000000'),
- takerFee: new BigNumber('200000000000000'),
- makerTokenAmount: new BigNumber('10000000000000000'),
- takerTokenAmount: new BigNumber('20000000000000000'),
- makerTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- takerTokenAddress: '0xef7fff64389b814a946f3e92105513705ca6b990',
- salt: new BigNumber('256'),
- feeRecipient: '0xb046140686d052fff581f63f8136cce132e857da',
- exchangeContractAddress: '0x12459c951127e0c374ff9105dda097662a027093',
- expirationUnixTimestampSec: new BigNumber('42'),
- ecSignature: {
- v: 27,
- r: '0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33',
- s: '0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254',
+import { OrderbookResponse } from '../../../src/types';
+
+export const orderbookResponse: OrderbookResponse = {
+ bids: {
+ total: 325,
+ page: 2,
+ perPage: 100,
+ records: [
+ {
+ order: {
+ makerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
+ takerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
+ feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da',
+ senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
+ makerAssetAmount: new BigNumber('10000000000000000'),
+ takerAssetAmount: new BigNumber('20000000000000000'),
+ makerFee: new BigNumber('100000000000000'),
+ takerFee: new BigNumber('200000000000000'),
+ expirationTimeSeconds: new BigNumber('1532560590'),
+ salt: new BigNumber('1532559225'),
+ makerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d',
+ takerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990',
+ exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093',
+ signature: '0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33',
+ },
+ metaData: {},
},
- },
- ],
- asks: [
- {
- maker: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
- taker: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- makerFee: new BigNumber('100000000000000'),
- takerFee: new BigNumber('200000000000000'),
- makerTokenAmount: new BigNumber('10000000000000000'),
- takerTokenAmount: new BigNumber('20000000000000000'),
- makerTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- takerTokenAddress: '0xef7fff64389b814a946f3e92105513705ca6b990',
- salt: new BigNumber('256'),
- feeRecipient: '0xb046140686d052fff581f63f8136cce132e857da',
- exchangeContractAddress: '0x12459c951127e0c374ff9105dda097662a027093',
- expirationUnixTimestampSec: new BigNumber('42'),
- ecSignature: {
- v: 27,
- r: '0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33',
- s: '0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254',
+ ],
+ },
+ asks: {
+ total: 500,
+ page: 2,
+ perPage: 100,
+ records: [
+ {
+ order: {
+ makerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
+ takerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
+ feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da',
+ senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
+ makerAssetAmount: new BigNumber('20000000000000000'),
+ takerAssetAmount: new BigNumber('10000000000000000'),
+ makerFee: new BigNumber('200000000000000'),
+ takerFee: new BigNumber('100000000000000'),
+ expirationTimeSeconds: new BigNumber('1532560590'),
+ salt: new BigNumber('1532559225'),
+ makerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990',
+ takerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d',
+ exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093',
+ signature: '0x013842a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b3518891',
+ },
+ metaData: {},
},
- },
- ],
+ ],
+ },
};
diff --git a/packages/connect/test/fixtures/standard_relayer_api/orders.json b/packages/connect/test/fixtures/standard_relayer_api/orders.json
index cfa780dc4..683612071 100644
--- a/packages/connect/test/fixtures/standard_relayer_api/orders.json
+++ b/packages/connect/test/fixtures/standard_relayer_api/orders.json
@@ -1,21 +1,26 @@
-[
- {
- "maker": "0x9e56625509c2f60af937f23b7b532600390e8c8b",
- "taker": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32",
- "makerFee": "100000000000000",
- "takerFee": "200000000000000",
- "makerTokenAmount": "10000000000000000",
- "takerTokenAmount": "20000000000000000",
- "makerTokenAddress": "0x323b5d4c32345ced77393b3530b1eed0f346429d",
- "takerTokenAddress": "0xef7fff64389b814a946f3e92105513705ca6b990",
- "salt": "256",
- "feeRecipient": "0x9e56625509c2f60af937f23b7b532600390e8c8b",
- "exchangeContractAddress": "0x9e56625509c2f60af937f23b7b532600390e8c8b",
- "expirationUnixTimestampSec": "42",
- "ecSignature": {
- "v": 27,
- "r": "0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33",
- "s": "0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254"
+{
+ "total": 984,
+ "page": 1,
+ "perPage": 100,
+ "records": [
+ {
+ "order": {
+ "makerAddress": "0x9e56625509c2f60af937f23b7b532600390e8c8b",
+ "takerAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32",
+ "feeRecipientAddress": "0xb046140686d052fff581f63f8136cce132e857da",
+ "senderAddress": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32",
+ "makerAssetAmount": "10000000000000000",
+ "takerAssetAmount": "20000000000000000",
+ "makerFee": "100000000000000",
+ "takerFee": "200000000000000",
+ "expirationTimeSeconds": "1532560590",
+ "salt": "1532559225",
+ "makerAssetData": "0xf47261b04c32345ced77393b3530b1eed0f346429d",
+ "takerAssetData": "0x0257179264389b814a946f3e92105513705ca6b990",
+ "exchangeAddress": "0x12459c951127e0c374ff9105dda097662a027093",
+ "signature": "0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33"
+ },
+ "metaData": {}
}
- }
-]
+ ]
+}
diff --git a/packages/connect/test/fixtures/standard_relayer_api/orders.ts b/packages/connect/test/fixtures/standard_relayer_api/orders.ts
index 5044777bd..01f8974b8 100644
--- a/packages/connect/test/fixtures/standard_relayer_api/orders.ts
+++ b/packages/connect/test/fixtures/standard_relayer_api/orders.ts
@@ -1,23 +1,30 @@
import { BigNumber } from '@0xproject/utils';
-export const ordersResponse = [
- {
- maker: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
- taker: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- makerFee: new BigNumber('100000000000000'),
- takerFee: new BigNumber('200000000000000'),
- makerTokenAmount: new BigNumber('10000000000000000'),
- takerTokenAmount: new BigNumber('20000000000000000'),
- makerTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- takerTokenAddress: '0xef7fff64389b814a946f3e92105513705ca6b990',
- salt: new BigNumber('256'),
- feeRecipient: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
- exchangeContractAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
- expirationUnixTimestampSec: new BigNumber('42'),
- ecSignature: {
- v: 27,
- r: '0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33',
- s: '0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254',
+import { OrdersResponse } from '../../../src/types';
+
+export const ordersResponse: OrdersResponse = {
+ total: 984,
+ page: 1,
+ perPage: 100,
+ records: [
+ {
+ order: {
+ makerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
+ takerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
+ feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da',
+ senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
+ makerAssetAmount: new BigNumber('10000000000000000'),
+ takerAssetAmount: new BigNumber('20000000000000000'),
+ makerFee: new BigNumber('100000000000000'),
+ takerFee: new BigNumber('200000000000000'),
+ expirationTimeSeconds: new BigNumber('1532560590'),
+ salt: new BigNumber('1532559225'),
+ makerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d',
+ takerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990',
+ exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093',
+ signature: '0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33',
+ },
+ metaData: {},
},
- },
-];
+ ],
+};
diff --git a/packages/connect/test/fixtures/standard_relayer_api/snapshot_orderbook_channel_message.ts b/packages/connect/test/fixtures/standard_relayer_api/snapshot_orderbook_channel_message.ts
deleted file mode 100644
index 1d7e67055..000000000
--- a/packages/connect/test/fixtures/standard_relayer_api/snapshot_orderbook_channel_message.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import * as orderbookJSON from './orderbook.json';
-
-const orderbookJsonString = JSON.stringify(orderbookJSON);
-
-export const snapshotOrderbookChannelMessage = `{
- "type": "snapshot",
- "channel": "orderbook",
- "requestId": 1,
- "payload": ${orderbookJsonString}
-}`;
-
-export const malformedSnapshotOrderbookChannelMessage = `{
- "type": "snapshot",
- "channel": "orderbook",
- "requestId": 1,
- "payload": {}
-}`;
diff --git a/packages/connect/test/fixtures/standard_relayer_api/token_pairs.json b/packages/connect/test/fixtures/standard_relayer_api/token_pairs.json
deleted file mode 100644
index 90f57a974..000000000
--- a/packages/connect/test/fixtures/standard_relayer_api/token_pairs.json
+++ /dev/null
@@ -1,16 +0,0 @@
-[
- {
- "tokenA": {
- "address": "0x323b5d4c32345ced77393b3530b1eed0f346429d",
- "minAmount": "0",
- "maxAmount": "10000000000000000000",
- "precision": 5
- },
- "tokenB": {
- "address": "0xef7fff64389b814a946f3e92105513705ca6b990",
- "minAmount": "0",
- "maxAmount": "50000000000000000000",
- "precision": 5
- }
- }
-]
diff --git a/packages/connect/test/fixtures/standard_relayer_api/token_pairs.ts b/packages/connect/test/fixtures/standard_relayer_api/token_pairs.ts
deleted file mode 100644
index f48b1e877..000000000
--- a/packages/connect/test/fixtures/standard_relayer_api/token_pairs.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { BigNumber } from '@0xproject/utils';
-
-import { TokenPairsItem } from '../../../src/types';
-
-export const tokenPairsResponse: TokenPairsItem[] = [
- {
- tokenA: {
- address: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- minAmount: new BigNumber(0),
- maxAmount: new BigNumber('10000000000000000000'),
- precision: 5,
- },
- tokenB: {
- address: '0xef7fff64389b814a946f3e92105513705ca6b990',
- minAmount: new BigNumber(0),
- maxAmount: new BigNumber('50000000000000000000'),
- precision: 5,
- },
- },
-];
diff --git a/packages/connect/test/fixtures/standard_relayer_api/unknown_orderbook_channel_message.ts b/packages/connect/test/fixtures/standard_relayer_api/unknown_orders_channel_message.ts
index cbedff60e..b6c0cd50c 100644
--- a/packages/connect/test/fixtures/standard_relayer_api/unknown_orderbook_channel_message.ts
+++ b/packages/connect/test/fixtures/standard_relayer_api/unknown_orders_channel_message.ts
@@ -2,9 +2,9 @@ import * as orderResponseJSON from './order/0xabc67323774bdbd24d94f977fa9ac94a50
const orderJSONString = JSON.stringify(orderResponseJSON);
-export const unknownOrderbookChannelMessage = `{
+export const unknownOrdersChannelMessage = `{
"type": "superGoodUpdate",
"channel": "orderbook",
- "requestId": 1,
- "payload": ${orderJSONString}
+ "requestId": "6ce8c5a6-5c46-4027-a44a-51831c77b8a1",
+ "payload": [${orderJSONString}]
}`;
diff --git a/packages/connect/test/fixtures/standard_relayer_api/update_orderbook_channel_message.ts b/packages/connect/test/fixtures/standard_relayer_api/update_orderbook_channel_message.ts
deleted file mode 100644
index 0e2c7523b..000000000
--- a/packages/connect/test/fixtures/standard_relayer_api/update_orderbook_channel_message.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import * as orderResponseJSON from './order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json';
-
-const orderJSONString = JSON.stringify(orderResponseJSON);
-
-export const updateOrderbookChannelMessage = `{
- "type": "update",
- "channel": "orderbook",
- "requestId": 1,
- "payload": ${orderJSONString}
-}`;
-
-export const malformedUpdateOrderbookChannelMessage = `{
- "type": "update",
- "channel": "orderbook",
- "requestId": 1,
- "payload": {}
-}`;
diff --git a/packages/connect/test/fixtures/standard_relayer_api/update_orders_channel_message.ts b/packages/connect/test/fixtures/standard_relayer_api/update_orders_channel_message.ts
new file mode 100644
index 000000000..c18a2c789
--- /dev/null
+++ b/packages/connect/test/fixtures/standard_relayer_api/update_orders_channel_message.ts
@@ -0,0 +1,17 @@
+import * as apiOrderJSON from './order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json';
+
+const apiOrderJSONString = JSON.stringify(apiOrderJSON);
+
+export const updateOrdersChannelMessage = `{
+ "type": "update",
+ "channel": "orders",
+ "requestId": "5a1ce3a2-22b9-41e6-a615-68077512e9e2",
+ "payload": [${apiOrderJSONString}]
+}`;
+
+export const malformedUpdateOrdersChannelMessage = `{
+ "type": "update",
+ "channel": "orders",
+ "requestId": "4d8efcee-adde-4475-9601-f0b30962ca2b",
+ "payload": {}
+}`;