Browse Source

FIX: too small QR on ln receive invoice (closes #235)

map
Overtorment 6 years ago
parent
commit
26f0b66997
  1. 8
      screen/lnd/lndViewInvoice.js

8
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,6 +168,7 @@ export default class LNDViewInvoice extends Component {
// Invoice has not expired, nor has it been paid for.
return (
<SafeBlueArea>
<ScrollView>
<View
style={{
flex: 1,
@ -221,6 +222,7 @@ export default class LNDViewInvoice extends Component {
/>
</View>
<BlueSpacing20 />
</ScrollView>
</SafeBlueArea>
);
}

Loading…
Cancel
Save