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:
padreug 2025-09-12 21:55:22 +02:00
parent 0f64df1d69
commit ee625a91e9
4 changed files with 53 additions and 1 deletions

View 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)),
})
},
}