From 5d723a6618262e0dc17e9ba0fe823da4fc7aaf56 Mon Sep 17 00:00:00 2001 From: Stella Date: Wed, 15 Apr 2020 11:58:29 +0200 Subject: [PATCH] fix: reverse base with quote --- drivers/saturn.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/saturn.js b/drivers/saturn.js index b1541201..4bfa6ca3 100644 --- a/drivers/saturn.js +++ b/drivers/saturn.js @@ -6,13 +6,14 @@ module.exports = async () => { const markets = await request('https://ticker.saturn.network/returnTicker.json'); return Object.keys(markets).map((market) => { - const [base] = market.split('_'); + const [quote, baseReference] = market.split('_'); const ticker = markets[market]; return new Ticker({ - base, - quote: ticker.symbol, - quoteName: ticker.name, + base: ticker.symbol, + baseReference, + baseName: ticker.name, + quote, close: parseToFloat(ticker.last), baseVolume: parseToFloat(ticker.quoteVolume), // reversed with quote quoteVolume: parseToFloat(ticker.baseVolume),