Browse Source
Merge pull request #745 from LN-Zap/fix/pay-onchain
fix(pay): dont focus on value input
renovate/lint-staged-8.x
Tom Kirkpatrick
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
0 additions and
6 deletions
-
app/components/Form/Pay.js
|
|
@ -14,17 +14,11 @@ import styles from './Pay.scss' |
|
|
|
class Pay extends Component { |
|
|
|
componentDidUpdate(prevProps) { |
|
|
|
const { |
|
|
|
isOnchain, |
|
|
|
isLn, |
|
|
|
payform: { payInput }, |
|
|
|
fetchInvoice |
|
|
|
} = this.props |
|
|
|
|
|
|
|
// If on-chain, focus on amount to let user know it's editable
|
|
|
|
if (isOnchain) { |
|
|
|
this.amountInput.focus() |
|
|
|
} |
|
|
|
|
|
|
|
// If LN go retrieve invoice details
|
|
|
|
if (prevProps.payform.payInput !== payInput && isLn) { |
|
|
|
fetchInvoice(payInput) |
|
|
|