mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 23:08:07 +01:00
FIX: view invoice will not allow you to go back if it is an initial screen
This commit is contained in:
parent
eaddee91a6
commit
ef7d543c6a
6 changed files with 25 additions and 33 deletions
|
@ -132,6 +132,17 @@ const CreateTransactionStackNavigator = createStackNavigator({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const LNDViewInvoiceStackNavigator = createStackNavigator({
|
||||||
|
LNDViewInvoice: {
|
||||||
|
screen: LNDViewInvoice,
|
||||||
|
swipeEnabled: false,
|
||||||
|
gesturesEnabled: false,
|
||||||
|
},
|
||||||
|
LNDViewAdditionalInvoiceInformation: {
|
||||||
|
screen: LNDViewAdditionalInvoiceInformation,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const LNDCreateInvoiceStackNavigator = createStackNavigator({
|
const LNDCreateInvoiceStackNavigator = createStackNavigator({
|
||||||
LNDCreateInvoice: {
|
LNDCreateInvoice: {
|
||||||
screen: LNDCreateInvoice,
|
screen: LNDCreateInvoice,
|
||||||
|
@ -221,7 +232,12 @@ const MainBottomTabs = createStackNavigator(
|
||||||
header: null,
|
header: null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
LNDViewExistingInvoice: {
|
||||||
|
screen: LNDViewInvoiceStackNavigator,
|
||||||
|
navigationOptions: {
|
||||||
|
header: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
// Select Wallet. Mostly for deep-linking
|
// Select Wallet. Mostly for deep-linking
|
||||||
|
|
||||||
SelectWallet: {
|
SelectWallet: {
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>189</string>
|
<string>190</string>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default class ScanLndInvoice extends React.Component {
|
||||||
|
|
||||||
if (!BlueApp.getWallets().some(item => item.type === LightningCustodianWallet.type)) {
|
if (!BlueApp.getWallets().some(item => item.type === LightningCustodianWallet.type)) {
|
||||||
alert('Before paying a Lightning invoice, you must first add a Lightning wallet.');
|
alert('Before paying a Lightning invoice, you must first add a Lightning wallet.');
|
||||||
props.navigation.dismiss()
|
props.navigation.dismiss();
|
||||||
} else {
|
} else {
|
||||||
let fromSecret;
|
let fromSecret;
|
||||||
if (props.navigation.state.params.fromSecret) fromSecret = props.navigation.state.params.fromSecret;
|
if (props.navigation.state.params.fromSecret) fromSecret = props.navigation.state.params.fromSecret;
|
||||||
|
@ -280,6 +280,7 @@ ScanLndInvoice.propTypes = {
|
||||||
goBack: PropTypes.function,
|
goBack: PropTypes.function,
|
||||||
navigate: PropTypes.function,
|
navigate: PropTypes.function,
|
||||||
getParam: PropTypes.function,
|
getParam: PropTypes.function,
|
||||||
|
dismiss: PropTypes.function,
|
||||||
state: PropTypes.shape({
|
state: PropTypes.shape({
|
||||||
params: PropTypes.shape({
|
params: PropTypes.shape({
|
||||||
uri: PropTypes.string,
|
uri: PropTypes.string,
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
/* global alert */
|
/* global alert */
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { ScrollView } from 'react-native';
|
import { ScrollView } from 'react-native';
|
||||||
import Ionicons from 'react-native-vector-icons/Ionicons';
|
import { BlueLoading, BlueButton, SafeBlueArea, BlueCard, BlueText, BlueNavigationStyle, BlueSpacing20 } from '../BlueComponents';
|
||||||
import { BlueLoading, BlueButton, SafeBlueArea, BlueCard, BlueText, BlueHeader, BlueSpacing20 } from '../BlueComponents';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
/** @type {AppStorage} */
|
/** @type {AppStorage} */
|
||||||
let BlueApp = require('../BlueApp');
|
let BlueApp = require('../BlueApp');
|
||||||
|
@ -12,10 +11,8 @@ let loc = require('../loc');
|
||||||
|
|
||||||
export default class PlausibleDeniability extends Component {
|
export default class PlausibleDeniability extends Component {
|
||||||
static navigationOptions = {
|
static navigationOptions = {
|
||||||
tabBarLabel: loc.plausibledeniability.title,
|
...BlueNavigationStyle(),
|
||||||
tabBarIcon: ({ tintColor, focused }) => (
|
title: loc.plausibledeniability.title,
|
||||||
<Ionicons name={focused ? 'ios-settings' : 'ios-settings-outline'} size={26} style={{ color: tintColor }} />
|
|
||||||
),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
@ -38,14 +35,6 @@ export default class PlausibleDeniability extends Component {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1 }}>
|
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1 }}>
|
||||||
<BlueHeader
|
|
||||||
backgroundColor={BlueApp.settings.brandingColor}
|
|
||||||
centerComponent={{
|
|
||||||
text: loc.plausibledeniability.title,
|
|
||||||
style: { color: BlueApp.settings.foregroundColor, fontSize: 23 },
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<BlueCard>
|
<BlueCard>
|
||||||
<ScrollView maxHeight={450}>
|
<ScrollView maxHeight={450}>
|
||||||
<BlueText>{loc.plausibledeniability.help}</BlueText>
|
<BlueText>{loc.plausibledeniability.help}</BlueText>
|
||||||
|
@ -85,20 +74,6 @@ export default class PlausibleDeniability extends Component {
|
||||||
this.props.navigation.navigate('Wallets');
|
this.props.navigation.navigate('Wallets');
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<BlueSpacing20 />
|
|
||||||
|
|
||||||
<BlueButton
|
|
||||||
icon={{
|
|
||||||
name: 'arrow-left',
|
|
||||||
type: 'octicon',
|
|
||||||
color: BlueApp.settings.buttonTextColor,
|
|
||||||
}}
|
|
||||||
title={loc.plausibledeniability.go_back}
|
|
||||||
onPress={() => {
|
|
||||||
this.props.navigation.goBack();
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</BlueCard>
|
</BlueCard>
|
||||||
</SafeBlueArea>
|
</SafeBlueArea>
|
||||||
|
|
|
@ -665,7 +665,7 @@ SendDetails.propTypes = {
|
||||||
navigation: PropTypes.shape({
|
navigation: PropTypes.shape({
|
||||||
goBack: PropTypes.function,
|
goBack: PropTypes.function,
|
||||||
navigate: PropTypes.func,
|
navigate: PropTypes.func,
|
||||||
dismiss: PropTypes.func,
|
dismiss: PropTypes.function,
|
||||||
state: PropTypes.shape({
|
state: PropTypes.shape({
|
||||||
params: PropTypes.shape({
|
params: PropTypes.shape({
|
||||||
address: PropTypes.string,
|
address: PropTypes.string,
|
||||||
|
|
|
@ -519,7 +519,7 @@ export default class WalletTransactions extends Component {
|
||||||
hash: rowData.item.hash,
|
hash: rowData.item.hash,
|
||||||
});
|
});
|
||||||
} else if (rowData.item.type === 'user_invoice' || rowData.item.type === 'payment_request') {
|
} else if (rowData.item.type === 'user_invoice' || rowData.item.type === 'payment_request') {
|
||||||
this.props.navigation.navigate('LNDViewInvoice', {
|
this.props.navigation.navigate('LNDViewExistingInvoice', {
|
||||||
invoice: rowData.item,
|
invoice: rowData.item,
|
||||||
fromWallet: this.state.wallet,
|
fromWallet: this.state.wallet,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue