Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix(ui): trim LN prs and onchain addresses in LightningInvoiceInput
Browse files Browse the repository at this point in the history
  • Loading branch information
korhaliv committed Nov 14, 2019
1 parent 938ebdb commit 44a028f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion renderer/components/Form/LightningInvoiceInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { Message } from 'components/UI'
import TextArea from './TextArea'
import messages from './messages'

const mask = value => (value ? value.trim() : value)

const validate = (intl, network, chain, value) => {
if (value) {
let chainName = `${chain}/lightning`
Expand Down Expand Up @@ -52,7 +54,7 @@ const LightningInvoiceInput = props => {

return (
<>
<TextArea validate={doValidate} {...props} validateOnBlur validateOnChange />
<TextArea mask={mask} validate={doValidate} {...props} validateOnBlur validateOnChange />
{value && !fieldState.error && (
<Message mt={2} variant="success">
<FormattedMessage
Expand Down

0 comments on commit 44a028f

Please sign in to comment.