Browse Source

REF: lint

acinqstrike
Overtorment 5 years ago
parent
commit
12b84fecb3
  1. 2
      WatchConnectivity.android.js
  2. 48
      screen/lnd/lndViewInvoice.js

2
WatchConnectivity.android.js

@ -9,4 +9,4 @@ export default class WatchConnectivity {
async handleLightningInvoiceCreateRequest(_walletIndex, _amount, _description) {} async handleLightningInvoiceCreateRequest(_walletIndex, _amount, _description) {}
async sendWalletsToWatch() {} async sendWalletsToWatch() {}
} }

48
screen/lnd/lndViewInvoice.js

@ -143,32 +143,48 @@ export default class LNDViewInvoice extends Component {
return ( return (
<SafeBlueArea style={{ flex: 1 }}> <SafeBlueArea style={{ flex: 1 }}>
<View style={{ flex: 2, flexDirection: 'column', justifyContent: 'center' }}> <View style={{ flex: 2, flexDirection: 'column', justifyContent: 'center' }}>
{(invoice.type === 'paid_invoice') && invoice.value && ( {invoice.type === 'paid_invoice' && invoice.value && (
<View style={{ flexDirection: 'row', justifyContent: 'center', paddingBottom: 8 }}> <View style={{ flexDirection: 'row', justifyContent: 'center', paddingBottom: 8 }}>
<Text style={{ color: '#0f5cc0', fontSize: 32, fontWeight: '600' }}> <Text style={{ color: '#0f5cc0', fontSize: 32, fontWeight: '600' }}>{invoice.value}</Text>
{invoice.value} <Text
</Text> style={{
<Text style={{ color: '#0f5cc0', fontSize: 16, marginHorizontal: 4, paddingBottom: 3, fontWeight: '600', alignSelf: 'flex-end' }}> color: '#0f5cc0',
fontSize: 16,
marginHorizontal: 4,
paddingBottom: 3,
fontWeight: '600',
alignSelf: 'flex-end',
}}
>
{loc.lndViewInvoice.sats} {loc.lndViewInvoice.sats}
</Text> </Text>
</View> </View>
)} )}
{(invoice.type === 'user_invoice') && invoice.amt && ( {invoice.type === 'user_invoice' && invoice.amt && (
<View style={{ flexDirection: 'row', justifyContent: 'center', paddingBottom: 8 }}> <View style={{ flexDirection: 'row', justifyContent: 'center', paddingBottom: 8 }}>
<Text style={{ color: '#0f5cc0', fontSize: 32, fontWeight: '600' }}> <Text style={{ color: '#0f5cc0', fontSize: 32, fontWeight: '600' }}>{invoice.amt}</Text>
{invoice.amt} <Text
</Text> style={{
<Text style={{ color: '#0f5cc0', fontSize: 16, marginHorizontal: 4, paddingBottom: 3, fontWeight: '600', alignSelf: 'flex-end' }}> color: '#0f5cc0',
fontSize: 16,
marginHorizontal: 4,
paddingBottom: 3,
fontWeight: '600',
alignSelf: 'flex-end',
}}
>
{loc.lndViewInvoice.sats} {loc.lndViewInvoice.sats}
</Text> </Text>
</View> </View>
)} )}
{!invoice.ispaid && invoice.memo && invoice.memo.length > 0 && ( {!invoice.ispaid && invoice.memo && invoice.memo.length > 0 && (
<Text style={{ color: '#9aa0aa', fontSize: 14, marginHorizontal: 4, paddingBottom: 6, fontWeight: '400', alignSelf: 'center' }}> <Text
style={{ color: '#9aa0aa', fontSize: 14, marginHorizontal: 4, paddingBottom: 6, fontWeight: '400', alignSelf: 'center' }}
>
{invoice.memo} {invoice.memo}
</Text> </Text>
)} )}
</View> </View>
<View style={{ flex: 3, alignItems: 'center', justifyContent: 'center' }}> <View style={{ flex: 3, alignItems: 'center', justifyContent: 'center' }}>
<View <View
@ -186,7 +202,6 @@ export default class LNDViewInvoice extends Component {
<Icon name="check" size={50} type="font-awesome" color="#0f5cc0" /> <Icon name="check" size={50} type="font-awesome" color="#0f5cc0" />
</View> </View>
<BlueText>{loc.lndViewInvoice.has_been_paid}</BlueText> <BlueText>{loc.lndViewInvoice.has_been_paid}</BlueText>
</View> </View>
<View style={{ flex: 1, justifyContent: 'flex-end', marginBottom: 24, alignItems: 'center' }}> <View style={{ flex: 1, justifyContent: 'flex-end', marginBottom: 24, alignItems: 'center' }}>
{invoice.payment_preimage && typeof invoice.payment_preimage === 'string' && ( {invoice.payment_preimage && typeof invoice.payment_preimage === 'string' && (
@ -194,14 +209,11 @@ export default class LNDViewInvoice extends Component {
style={{ flexDirection: 'row', alignItems: 'center' }} style={{ flexDirection: 'row', alignItems: 'center' }}
onPress={() => this.setState({ showPreimageQr: true })} onPress={() => this.setState({ showPreimageQr: true })}
> >
<Text style={{ color: '#9aa0aa', fontSize: 14, marginRight: 8 }}> <Text style={{ color: '#9aa0aa', fontSize: 14, marginRight: 8 }}>{loc.send.create.details}</Text>
{loc.send.create.details}
</Text>
<Icon name="angle-right" size={18} type="font-awesome" color="#9aa0aa" /> <Icon name="angle-right" size={18} type="font-awesome" color="#9aa0aa" />
</TouchableOpacity> </TouchableOpacity>
)} )}
</View> </View>
</SafeBlueArea> </SafeBlueArea>
); );
} }

Loading…
Cancel
Save