Merge pull request #1669 from RafaelTaranto/feat/bitfinex-implementation

LAM-1087 feat: bitfinex implementation
This commit is contained in:
Rafael Taranto 2024-04-15 09:02:17 +01:00 committed by GitHub
commit f3df8904f5
6 changed files with 68 additions and 4 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: 'bitfinex',
name: 'Bitfinex',
title: 'Bitfinex (Exchange)',
elements: [
{
code: 'key',
display: 'API Key',
component: TextInputFormik,
face: true,
long: true
},
{
code: 'secret',
display: 'API Secret',
component: SecretInputFormik
}
],
getValidationSchema: account => {
return Yup.object().shape({
key: Yup.string('The API key must be a string')
.max(100, 'The API key is too long')
.required('The API key is required'),
secret: Yup.string('The API secret must be a string')
.max(100, 'The API secret is too long')
.test(secretTest(account?.secret, 'API secret'))
})
}
}

View file

@ -1,5 +1,6 @@
import binance from './binance'
import binanceus from './binanceus'
import bitfinex from './bitfinex'
import bitgo from './bitgo'
import bitstamp from './bitstamp'
import blockcypher from './blockcypher'
@ -31,5 +32,6 @@ export default {
[cex.code]: cex,
[ciphertrace.code]: ciphertrace,
[trongrid.code]: trongrid,
[binance.code]: binance
[binance.code]: binance,
[bitfinex.code]: bitfinex
}