aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/test/parsers/ddex_orders/index_test.ts
diff options
context:
space:
mode:
authorzkao <zichongkao@gmail.com>2018-12-15 04:15:35 +0800
committerGitHub <noreply@github.com>2018-12-15 04:15:35 +0800
commit6d45beccad44e86ddd692d0cf54c09c29c5d9daf (patch)
tree66ef5002e7d407f891d991fcb6cbd10ddb9ee5c9 /packages/pipeline/test/parsers/ddex_orders/index_test.ts
parent1efde6f59b976a074ba2ea15be867400b21dd68b (diff)
downloaddexon-sol-tools-6d45beccad44e86ddd692d0cf54c09c29c5d9daf.tar
dexon-sol-tools-6d45beccad44e86ddd692d0cf54c09c29c5d9daf.tar.gz
dexon-sol-tools-6d45beccad44e86ddd692d0cf54c09c29c5d9daf.tar.bz2
dexon-sol-tools-6d45beccad44e86ddd692d0cf54c09c29c5d9daf.tar.lz
dexon-sol-tools-6d45beccad44e86ddd692d0cf54c09c29c5d9daf.tar.xz
dexon-sol-tools-6d45beccad44e86ddd692d0cf54c09c29c5d9daf.tar.zst
dexon-sol-tools-6d45beccad44e86ddd692d0cf54c09c29c5d9daf.zip
Fix dex order quote/base asset assigning (#1432)
Diffstat (limited to 'packages/pipeline/test/parsers/ddex_orders/index_test.ts')
-rw-r--r--packages/pipeline/test/parsers/ddex_orders/index_test.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/pipeline/test/parsers/ddex_orders/index_test.ts b/packages/pipeline/test/parsers/ddex_orders/index_test.ts
index 9f4bfe7e3..4a4a86bf8 100644
--- a/packages/pipeline/test/parsers/ddex_orders/index_test.ts
+++ b/packages/pipeline/test/parsers/ddex_orders/index_test.ts
@@ -39,12 +39,14 @@ describe('ddex_orders', () => {
expected.observedTimestamp = observedTimestamp;
expected.orderType = 'bid';
expected.price = new BigNumber(0.5);
- expected.baseAssetSymbol = 'DEF';
- expected.baseAssetAddress = '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81';
- expected.baseVolume = new BigNumber(5);
- expected.quoteAssetSymbol = 'ABC';
- expected.quoteAssetAddress = '0x0000000000000000000000000000000000000000';
- expected.quoteVolume = new BigNumber(10);
+ // ddex currently confuses base and quote assets.
+ // Switch them to maintain our internal consistency.
+ expected.baseAssetSymbol = 'ABC';
+ expected.baseAssetAddress = '0x0000000000000000000000000000000000000000';
+ expected.baseVolume = new BigNumber(10);
+ expected.quoteAssetSymbol = 'DEF';
+ expected.quoteAssetAddress = '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81';
+ expected.quoteVolume = new BigNumber(5);
const actual = parseDdexOrder(ddexMarket, observedTimestamp, orderType, source, ddexOrder);
expect(actual).deep.equal(expected);