refactor: simplify and cleanup front-end

This commit is contained in:
José Oliveira 2021-02-15 13:46:09 +00:00 committed by Josh Harvey
parent a8fbb57bf6
commit 351d2a078b
14 changed files with 93 additions and 213 deletions

View file

@ -8,7 +8,6 @@ import secretTest from './helper'
export default {
code: 'infura',
name: 'Infura',
hasSecret: true,
title: 'Infura (Wallet)',
elements: [
{
@ -30,19 +29,8 @@ export default {
face: true
}
],
validationSchema: Yup.object().shape({
apiKey: Yup.string()
.max(100, 'Too long')
.required(),
apiSecret: Yup.string()
.max(100, 'Too long')
.required(),
endpoint: Yup.string()
.max(100, 'Too long')
.required()
}),
getValidationSchema: account => {
const schema = {
return Yup.object().shape({
apiKey: Yup.string()
.max(100, 'Too long')
.required(),
@ -52,7 +40,6 @@ export default {
endpoint: Yup.string()
.max(100, 'Too long')
.required()
}
return Yup.object().shape(schema)
})
}
}