* Wallet flow * Prepopulate fields of complementary protocol * Remove TODO about one mutation for save We need to save protocols in separate mutations so we can use the wallet id returned by the first protocol save for the following protocol saves and save them all to the same wallet. * Fix badges not updated on wallet delete * Fix useProtocol call * Fix lightning address save via prompt * Don't pass share as attribute to DOM * Fix useCallback dependency * Progress numbers as SVGs * Fix progress line margins * Remove unused saveWallet arguments * Update cache with settings response * Fix line does not connect with number 1 * Don't reuse page nav arrows in form nav * Fix missing SVG hover style * Fix missing space in wallet save log message * Reuse CSS from nav.module.css * align buttons and their icons/text * center form progress line * increase top padding of form on smaller screens * provide margin above button bar on settings form --------- Co-authored-by: k00b <k00b@stacker.news>
50 lines
1.6 KiB
JavaScript
50 lines
1.6 KiB
JavaScript
import nwcSuite from './nwc'
|
|
import lnAddr from './lnAddr'
|
|
import clnRest from './clnRest'
|
|
import lndGrpc from './lndGrpc'
|
|
import lnc from './lnc'
|
|
import lnbitsSuite from './lnbits'
|
|
import phoenixdSuite from './phoenixd'
|
|
import blinkSuite from './blink'
|
|
import webln from './webln'
|
|
|
|
/**
|
|
* Protocol names as used in the database
|
|
* @typedef {'NWC'|'LNBITS'|'PHOENIXD'|'BLINK'|'WEBLN'|'LN_ADDR'|'LNC'|'CLN_REST'|'LND_GRPC'} ProtocolName
|
|
* @typedef {'text'|'password'} InputType
|
|
*/
|
|
|
|
/**
|
|
* @typedef {Object} Protocol
|
|
* @property {ProtocolName} name - must match a protocol name in the database
|
|
* @property {string} displayName - protocol name in user interface
|
|
* @property {boolean} send - is this protocol for sending payments?
|
|
* @property {ProtocolField[]} fields - protocol fields for configuration
|
|
* @property {string} relationName - name of the relation in the WalletProtocol prisma model
|
|
*/
|
|
|
|
/**
|
|
* @typedef {Object} ProtocolField
|
|
* @property {string} name - formik name
|
|
* @property {string} label - field label shown in user interface
|
|
* @property {InputType} type - input type (text, password)
|
|
* @property {boolean} required - whether field is required
|
|
* @property {yup.Schema} validate - validation rules to apply
|
|
* @property {string} [placeholder] - placeholder text shown in input field
|
|
* @property {string} [hint] - hint text shown below field
|
|
* @property {boolean} [share] - whether field can be used to prepopulate field of complementary send/receive protocol
|
|
*/
|
|
|
|
/** @type {Protocol[]} */
|
|
export default [
|
|
...nwcSuite,
|
|
lnAddr,
|
|
clnRest,
|
|
lndGrpc,
|
|
lnc,
|
|
...phoenixdSuite,
|
|
...lnbitsSuite,
|
|
...blinkSuite,
|
|
webln
|
|
]
|