Skip to content

Commit

Permalink
fix(bitfinex): get markets with a : in the pair as well
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpater committed Jun 4, 2020
1 parent 2211714 commit 569fe55
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/bitfinex.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ class Bitfinex extends Driver {
const symbolsMap = new Map(symbols);

return tickers.map((ticker) => {
const market = ticker[0];
if (market[0] !== 't') return undefined;
const regex = new RegExp(`^([A-Z]*)(${currencies.join('|')})$`);
const pair = regex.exec(ticker[0].substring(1));
const regex = new RegExp(`^t(${currencies.join('|')}):?(${currencies.join('|')})$`);
const pair = regex.exec(ticker[0]);
if (!pair) return undefined;
const [, base, quote] = pair;

Expand Down

0 comments on commit 569fe55

Please sign in to comment.