feat: add support for binance.us, cex.io and ftx
This commit is contained in:
parent
2040c388b8
commit
01114d01e4
12 changed files with 194 additions and 3 deletions
36
new-lamassu-admin/src/pages/Services/schemas/ftx.js
Normal file
36
new-lamassu-admin/src/pages/Services/schemas/ftx.js
Normal 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))
|
||||
})
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue