diff options
author | Xianny <8582774+xianny@users.noreply.github.com> | 2019-01-11 05:07:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-11 05:07:52 +0800 |
commit | a5b7a351609a5e6689bb97990216153f64302462 (patch) | |
tree | c5a3c0299c491737c869929e372d6c0318c11f73 /packages/pipeline/src/parsers/ddex_orders/index.ts | |
parent | 53fc860d6190c19f13c451eb89dd5c0c1cdcd1f4 (diff) | |
download | dexon-sol-tools-a5b7a351609a5e6689bb97990216153f64302462.tar dexon-sol-tools-a5b7a351609a5e6689bb97990216153f64302462.tar.gz dexon-sol-tools-a5b7a351609a5e6689bb97990216153f64302462.tar.bz2 dexon-sol-tools-a5b7a351609a5e6689bb97990216153f64302462.tar.lz dexon-sol-tools-a5b7a351609a5e6689bb97990216153f64302462.tar.xz dexon-sol-tools-a5b7a351609a5e6689bb97990216153f64302462.tar.zst dexon-sol-tools-a5b7a351609a5e6689bb97990216153f64302462.zip |
upgrade to ddex api v3 (#1507)
Diffstat (limited to 'packages/pipeline/src/parsers/ddex_orders/index.ts')
-rw-r--r-- | packages/pipeline/src/parsers/ddex_orders/index.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/pipeline/src/parsers/ddex_orders/index.ts b/packages/pipeline/src/parsers/ddex_orders/index.ts index eeb9c9d5b..562f894ab 100644 --- a/packages/pipeline/src/parsers/ddex_orders/index.ts +++ b/packages/pipeline/src/parsers/ddex_orders/index.ts @@ -58,14 +58,12 @@ export function parseDdexOrder( tokenOrder.orderType = orderType; tokenOrder.price = price; - // ddex currently confuses quote and base assets. - // We switch them here to maintain our internal consistency. - tokenOrder.baseAssetSymbol = ddexMarket.quoteToken; - tokenOrder.baseAssetAddress = ddexMarket.quoteTokenAddress; + tokenOrder.baseAssetSymbol = ddexMarket.baseToken; + tokenOrder.baseAssetAddress = ddexMarket.baseTokenAddress; tokenOrder.baseVolume = amount; - tokenOrder.quoteAssetSymbol = ddexMarket.baseToken; - tokenOrder.quoteAssetAddress = ddexMarket.baseTokenAddress; + tokenOrder.quoteAssetSymbol = ddexMarket.quoteToken; + tokenOrder.quoteAssetAddress = ddexMarket.quoteTokenAddress; tokenOrder.quoteVolume = price.times(amount); return tokenOrder; } |