ADD: Show invoice description on success screen

This commit is contained in:
Marcos Rodriguez Vélez 2019-02-01 02:08:37 -05:00
parent 697cb0f198
commit 157c4077de
2 changed files with 17 additions and 1 deletions

View File

@ -156,7 +156,7 @@ export default class ScanLndInvoice extends React.Component {
this.props.navigation.navigate('Success', {
amount: this.state.decoded.num_satoshis,
amountUnit: BitcoinUnit.SATS,
dismissModal: () => this.props.navigation.dismiss(),
invoiceDescription: this.state.decoded.description,
});
},
);

View File

@ -20,6 +20,7 @@ export default class Success extends Component {
amount: props.navigation.getParam('amount'),
fee: props.navigation.getParam('fee') || 0,
amountUnit: props.navigation.getParam('amountUnit') || BitcoinUnit.BTC,
invoiceDescription: props.navigation.getParam('invoiceDescription') || '',
};
}
@ -69,6 +70,21 @@ export default class Success extends Component {
{loc.send.create.fee}: {loc.formatBalance(this.state.fee, BitcoinUnit.SATS)}
</Text>
)}
{this.state.fee <= 0 && (
<Text
numberOfLines={0}
style={{
color: '#37c0a1',
fontSize: 14,
marginHorizontal: 4,
paddingBottom: 6,
fontWeight: '500',
alignSelf: 'center',
}}
>
{this.state.invoiceDescription}
</Text>
)}
</BlueCard>
<View
style={{