feat: integrate LNBits wallet schema and configuration
- Added LNBits wallet schema to the admin UI, including validation and input components. - Updated the services index to include LNBits in the available wallet options. - Enhanced the wallet selection component to handle LNBits configuration input.
This commit is contained in:
parent
0f64df1d69
commit
ee625a91e9
4 changed files with 53 additions and 1 deletions
36
packages/admin-ui/src/pages/Services/schemas/lnbits.js
Normal file
36
packages/admin-ui/src/pages/Services/schemas/lnbits.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import * as Yup from 'yup'
|
||||
|
||||
import {
|
||||
SecretInput,
|
||||
TextInput,
|
||||
} from '../../../components/inputs/formik'
|
||||
|
||||
import { secretTest } from './helper'
|
||||
|
||||
export default {
|
||||
code: 'lnbits',
|
||||
name: 'LNBits',
|
||||
title: 'LNBits (Wallet)',
|
||||
elements: [
|
||||
{
|
||||
code: 'endpoint',
|
||||
display: 'LNBits Server URL',
|
||||
component: TextInput,
|
||||
},
|
||||
{
|
||||
code: 'adminKey',
|
||||
display: 'Admin Key',
|
||||
component: SecretInput,
|
||||
},
|
||||
],
|
||||
getValidationSchema: account => {
|
||||
return Yup.object().shape({
|
||||
endpoint: Yup.string('The endpoint must be a string')
|
||||
.max(200, 'The endpoint is too long')
|
||||
.required('The endpoint is required'),
|
||||
adminKey: Yup.string('The Admin Key must be a string')
|
||||
.max(200, 'The Admin Key is too long')
|
||||
.test(secretTest(account?.adminKey)),
|
||||
})
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue