feat: add support for binance.us, cex.io and ftx

This commit is contained in:
José Oliveira 2021-08-04 17:56:37 +01:00
parent 2040c388b8
commit 01114d01e4
12 changed files with 194 additions and 3 deletions

View file

@ -0,0 +1,36 @@
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()
.max(100, 'Too long')
.required(),
privateKey: Yup.string()
.max(100, 'Too long')
.test(secretTest(account?.privateKey))
})
}
}