Merge pull request #1704 from RafaelTaranto/chore/alchemy-labels-on-infura
LAM-1106 chore: add Alchemy label and remove extra fields
This commit is contained in:
commit
b8b3c374ee
3 changed files with 4 additions and 26 deletions
|
|
@ -1,27 +1,12 @@
|
|||
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: 'infura',
|
||||
name: 'Infura',
|
||||
title: 'Infura (Wallet)',
|
||||
name: 'Infura/Alchemy',
|
||||
title: 'Infura/Alchemy (Wallet)',
|
||||
elements: [
|
||||
{
|
||||
code: 'apiKey',
|
||||
display: 'Project ID',
|
||||
component: TextInputFormik,
|
||||
face: true,
|
||||
long: true
|
||||
},
|
||||
{
|
||||
code: 'apiSecret',
|
||||
display: 'Project Secret',
|
||||
component: SecretInputFormik
|
||||
},
|
||||
{
|
||||
code: 'endpoint',
|
||||
display: 'Endpoint',
|
||||
|
|
@ -29,14 +14,8 @@ export default {
|
|||
face: true
|
||||
}
|
||||
],
|
||||
getValidationSchema: account => {
|
||||
getValidationSchema: () => {
|
||||
return Yup.object().shape({
|
||||
apiKey: Yup.string('The project ID must be a string')
|
||||
.max(100, 'The project ID is too long')
|
||||
.required('The project ID is required'),
|
||||
apiSecret: Yup.string('The project secret must be a string')
|
||||
.max(100, 'The project secret is too long')
|
||||
.test(secretTest(account?.apiSecret, 'project secret')),
|
||||
endpoint: Yup.string('The endpoint must be a string')
|
||||
.max(100, 'The endpoint is too long')
|
||||
.required('The endpoint is required')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue