From 46116feb60b0e18d95db860fd683ca2d459b95a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Oliveira?= Date: Mon, 9 Aug 2021 01:01:53 +0100 Subject: [PATCH] refactor: simplify filter function and remove unnecessary comments --- lib/plugins/exchange/binanceus.js | 2 -- lib/plugins/exchange/cex.js | 3 --- lib/plugins/exchange/ftx.js | 1 - .../src/pages/Wizard/components/Wallet/ChooseExchange.js | 3 +-- 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/plugins/exchange/binanceus.js b/lib/plugins/exchange/binanceus.js index fb98998f..78df0263 100644 --- a/lib/plugins/exchange/binanceus.js +++ b/lib/plugins/exchange/binanceus.js @@ -15,6 +15,4 @@ const loadConfig = (account) => { return { ...mapped, timeout: 3000 } } -// Documentation mentions a mandatory field 'time', not sure how ccxt handles this, probably works if we send this via options - module.exports = { loadConfig, REQUIRED_CONFIG_FIELDS, CRYPTO, FIAT, ORDER_TYPE } diff --git a/lib/plugins/exchange/cex.js b/lib/plugins/exchange/cex.js index ae3b2885..8405996b 100644 --- a/lib/plugins/exchange/cex.js +++ b/lib/plugins/exchange/cex.js @@ -15,7 +15,4 @@ const loadConfig = (account) => { return { ...mapped, timeout: 3000 } } -// Documentation mentions a field 'nonce', doesn't specify if it's mandatory -// or not but we should pay attention to this when testing - module.exports = { loadConfig, REQUIRED_CONFIG_FIELDS, CRYPTO, FIAT, ORDER_TYPE } diff --git a/lib/plugins/exchange/ftx.js b/lib/plugins/exchange/ftx.js index f9e154e8..a8cf8df3 100644 --- a/lib/plugins/exchange/ftx.js +++ b/lib/plugins/exchange/ftx.js @@ -6,7 +6,6 @@ const { ORDER_TYPES } = require('./consts') const ORDER_TYPE = ORDER_TYPES.MARKET const { BTC, BCH, ETH, LTC, USDT } = COINS const CRYPTO = [BTC, ETH, LTC, BCH, USDT] -// ftx supports EUR as well but only for certain cryptos: ETH, BTC const FIAT = ['USD'] const REQUIRED_CONFIG_FIELDS = ['apiKey', 'privateKey'] diff --git a/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseExchange.js b/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseExchange.js index 10b9b51c..98760107 100644 --- a/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseExchange.js +++ b/new-lamassu-admin/src/pages/Wizard/components/Wallet/ChooseExchange.js @@ -38,8 +38,7 @@ const SAVE_ACCOUNTS = gql` } ` -const isConfigurable = it => - R.contains(it)(['kraken', 'itbit', 'bitstamp', 'binanceus', 'cex', 'ftx']) +const isConfigurable = it => !R.contains(it)(['mock-exchange']) const ChooseExchange = ({ data: currentData, addData }) => { const classes = useStyles()