diff --git a/screen/lnd/lndViewInvoice.js b/screen/lnd/lndViewInvoice.js index 76312050..f7cf8135 100644 --- a/screen/lnd/lndViewInvoice.js +++ b/screen/lnd/lndViewInvoice.js @@ -1,6 +1,6 @@ /* global alert */ import React, { Component } from 'react'; -import { Animated, StyleSheet, View, TouchableOpacity, Clipboard, Dimensions, Share } from 'react-native'; +import { Animated, StyleSheet, View, TouchableOpacity, Clipboard, Dimensions, Share, ScrollView } from 'react-native'; import { BlueLoading, BlueText, SafeBlueArea, BlueButton, BlueNavigationStyle, BlueSpacing20 } from '../../BlueComponents'; import PropTypes from 'prop-types'; import ReactNativeHapticFeedback from 'react-native-haptic-feedback'; @@ -29,7 +29,7 @@ export default class LNDViewInvoice extends Component { isLoading: typeof invoice === 'string', addressText: typeof invoice === 'object' && invoice.hasOwnProperty('payment_request') ? invoice.payment_request : invoice, isFetchingInvoices: true, - qrCodeHeight: height > width ? height / 2.5 : width / 2, + qrCodeHeight: height > width ? width - 20 : width / 2, }; this.fetchInvoiceInterval = undefined; } @@ -93,7 +93,7 @@ export default class LNDViewInvoice extends Component { onLayout = () => { const { height } = Dimensions.get('window'); - this.setState({ qrCodeHeight: height > width ? height / 2.5 : width / 2 }); + this.setState({ qrCodeHeight: height > width ? width - 20 : width / 2 }); }; render() { @@ -168,59 +168,61 @@ export default class LNDViewInvoice extends Component { // Invoice has not expired, nor has it been paid for. return ( - - - + + + + + + + {invoice && invoice.amt && Please pay {invoice.amt} sats} + {invoice && invoice.description && For: {invoice.description}} + + + {this.state.addressText} + + + + { + Share.share({ + message: 'lightning:' + invoice.payment_request, + }); + }} + title={loc.receive.details.share} + /> + this.props.navigation.navigate('LNDViewAdditionalInvoiceInformation', { fromWallet: this.state.fromWallet })} + title="Additional Information" /> - - {invoice && invoice.amt && Please pay {invoice.amt} sats} - {invoice && invoice.description && For: {invoice.description}} - - - {this.state.addressText} - - - - { - Share.share({ - message: 'lightning:' + invoice.payment_request, - }); - }} - title={loc.receive.details.share} - /> - this.props.navigation.navigate('LNDViewAdditionalInvoiceInformation', { fromWallet: this.state.fromWallet })} - title="Additional Information" - /> - - + ); }