ekzyis 6a5713034b Make clear that message belongs to test
* validate.message was used in tandem with validate.test
* it might be confused as the message if the validation for validate.type failed
* now validate.test can be a function or an object of { test, message } shape which matches Yup.test
2024-07-17 03:31:16 +02:00

29 lines
636 B
JavaScript

export const name = 'lightning-address'
export const shortName = 'lnAddr'
export const fields = [
{
name: 'address',
label: 'lightning address',
type: 'text',
autoComplete: 'off',
validate: {
type: 'email',
test: {
test: addr => !addr.endsWith('@stacker.news'),
message: 'automated withdrawals must be external'
}
}
}
]
export const card = {
title: 'lightning address',
subtitle: 'autowithdraw to a lightning address',
badges: ['receive only', 'non-custodialish']
}
export const walletType = 'LIGHTNING_ADDRESS'
export const walletField = 'walletLightningAddress'