Merge pull request #1669 from RafaelTaranto/feat/bitfinex-implementation
LAM-1087 feat: bitfinex implementation
This commit is contained in:
commit
f3df8904f5
6 changed files with 68 additions and 4 deletions
36
new-lamassu-admin/src/pages/Services/schemas/bitfinex.js
Normal file
36
new-lamassu-admin/src/pages/Services/schemas/bitfinex.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: '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'))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue