feat: galoy account setup

This commit is contained in:
José Oliveira 2022-04-12 17:27:38 +01:00 committed by siiky
parent f870b9f563
commit 688ec0bcbc
8 changed files with 87 additions and 7 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: 'galoy',
name: 'Galoy',
title: 'Galoy (Wallet)',
elements: [
{
code: 'apiKey',
display: 'API Key',
component: TextInputFormik,
face: true,
long: true
},
{
code: 'walletId',
display: 'Wallet ID',
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'),
walletId: Yup.string('The wallet id must be a string')
.max(100, 'The wallet id is too long')
.test(secretTest(account?.walletId))
})
}
}