Merge pull request #1463 from josepfo/fix/deprecate-ftx-ticker-and-exchange

fix: deprecate ftx ticker and exchange
This commit is contained in:
Rafael Taranto 2022-12-05 10:04:24 +00:00 committed by GitHub
commit 2d5f62272d
6 changed files with 5 additions and 48 deletions

View file

@ -4,7 +4,7 @@ const _ = require('lodash/fp')
const { ALL } = require('../../plugins/common/ccxt')
const { BTC, BCH, DASH, ETH, LTC, USDT, ZEC, XMR } = COINS
const { bitpay, coinbase, itbit, bitstamp, kraken, binanceus, cex, ftx, binance } = ALL
const { bitpay, coinbase, itbit, bitstamp, kraken, binanceus, cex, binance } = ALL
const TICKER = 'ticker'
const WALLET = 'wallet'
@ -19,8 +19,7 @@ const WALLET_SCORING = 'wallet_scoring'
const ALL_ACCOUNTS = [
{ code: 'binance', display: 'Binance', class: TICKER, cryptos: binance.CRYPTO },
{ code: 'binanceus', display: 'Binance.us', class: TICKER, cryptos: binanceus.CRYPTO },
{ code: 'cex', display: 'CEX', class: TICKER, cryptos: cex.CRYPTO },
{ code: 'ftx', display: 'FTX', class: TICKER, cryptos: ftx.CRYPTO },
{ code: 'cex', display: 'CEX.IO', class: TICKER, cryptos: cex.CRYPTO },
{ code: 'bitpay', display: 'Bitpay', class: TICKER, cryptos: bitpay.CRYPTO },
{ code: 'kraken', display: 'Kraken', class: TICKER, cryptos: kraken.CRYPTO },
{ code: 'bitstamp', display: 'Bitstamp', class: TICKER, cryptos: bitstamp.CRYPTO },
@ -42,8 +41,7 @@ const ALL_ACCOUNTS = [
{ code: 'kraken', display: 'Kraken', class: EXCHANGE, cryptos: kraken.CRYPTO },
{ code: 'binance', display: 'Binance', class: EXCHANGE, cryptos: binance.CRYPTO },
{ code: 'binanceus', display: 'Binance.us', class: EXCHANGE, cryptos: binanceus.CRYPTO },
{ code: 'cex', display: 'CEX', class: EXCHANGE, cryptos: cex.CRYPTO },
{ code: 'ftx', display: 'FTX', class: EXCHANGE, cryptos: ftx.CRYPTO },
{ code: 'cex', display: 'CEX.IO', class: EXCHANGE, cryptos: cex.CRYPTO },
{ code: 'mock-wallet', display: 'Mock (Caution!)', class: WALLET, cryptos: ALL_CRYPTOS, dev: true },
{ code: 'no-exchange', display: 'No exchange', class: EXCHANGE, cryptos: ALL_CRYPTOS },
{ code: 'mock-exchange', display: 'Mock exchange', class: EXCHANGE, cryptos: ALL_CRYPTOS, dev: true },

View file

@ -21,7 +21,6 @@ const SECRET_FIELDS = [
'itbit.clientSecret',
'kraken.privateKey',
'binanceus.privateKey',
'ftx.privateKey',
'cex.privateKey',
'binance.privateKey',
'twilio.authToken'

View file

@ -6,7 +6,6 @@ const bitstamp = require('../exchange/bitstamp')
const itbit = require('../exchange/itbit')
const binanceus = require('../exchange/binanceus')
const cex = require('../exchange/cex')
const ftx = require('../exchange/ftx')
const bitpay = require('../ticker/bitpay')
const binance = require('../exchange/binance')
const logger = require('../../logger')
@ -15,7 +14,6 @@ const { BTC, BCH, DASH, ETH, LTC, ZEC, USDT } = COINS
const ALL = {
cex: cex,
ftx: ftx,
binanceus: binanceus,
kraken: kraken,
bitstamp: bitstamp,

View file

@ -7,8 +7,8 @@ import { secretTest } from './helper'
export default {
code: 'cex',
name: 'Cex',
title: 'Cex (Exchange)',
name: 'CEX.IO',
title: 'CEX.IO (Exchange)',
elements: [
{
code: 'apiKey',

View file

@ -1,36 +0,0 @@
import * as Yup from 'yup'
import SecretInputFormik from 'src/components/inputs/formik/SecretInput'
import TextInputFormik from 'src/components/inputs/formik/TextInput'
import { secretTest } from './helper'
export default {
code: 'ftx',
name: 'Ftx',
title: 'Ftx (Exchange)',
elements: [
{
code: 'apiKey',
display: 'API Key',
component: TextInputFormik,
face: true,
long: true
},
{
code: 'privateKey',
display: 'Private Key',
component: SecretInputFormik
}
],
getValidationSchema: account => {
return Yup.object().shape({
apiKey: Yup.string('The API key must be a string')
.max(100, 'The API key is too long')
.required('The API key is required'),
privateKey: Yup.string('The private key must be a string')
.max(100, 'The private key is too long')
.test(secretTest(account?.privateKey, 'private key'))
})
}
}

View file

@ -5,7 +5,6 @@ import bitstamp from './bitstamp'
import blockcypher from './blockcypher'
import cex from './cex'
import ciphertrace from './ciphertrace'
import ftx from './ftx'
import infura from './infura'
import itbit from './itbit'
import kraken from './kraken'
@ -23,7 +22,6 @@ export default {
[twilio.code]: twilio,
[binanceus.code]: binanceus,
[cex.code]: cex,
[ftx.code]: ftx,
[ciphertrace.code]: ciphertrace,
[binance.code]: binance
}