mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
FIX: Latest nav 5 would show double headers if modals were not their own stack.
This commit is contained in:
parent
bfa147c912
commit
67580c2a90
@ -275,6 +275,34 @@ function DrawerRoot() {
|
||||
);
|
||||
}
|
||||
|
||||
const ReceiveDetailsStack = createStackNavigator();
|
||||
const ReceiveDetailsStackRoot = () => (
|
||||
<ReceiveDetailsStack.Navigator name="ReceiveDetailsRoot" screenOptions={defaultStackScreenOptions} initialRouteName="ReceiveDetails">
|
||||
<RootStack.Screen name="ReceiveDetails" component={ReceiveDetails} options={ReceiveDetails.navigationOptions} />
|
||||
</ReceiveDetailsStack.Navigator>
|
||||
);
|
||||
|
||||
const WalletXpubStack = createStackNavigator();
|
||||
const WalletXpubStackRoot = () => (
|
||||
<WalletXpubStack.Navigator name="WalletXpubRoot" screenOptions={defaultStackScreenOptions} initialRouteName="WalletXpub">
|
||||
<WalletXpubStack.Screen name="WalletXpub" component={WalletXpub} options={WalletXpub.navigationOptions} />
|
||||
</WalletXpubStack.Navigator>
|
||||
);
|
||||
|
||||
const WalletExportStack = createStackNavigator();
|
||||
const WalletExportStackRoot = () => (
|
||||
<WalletExportStack.Navigator name="WalletExportRoot" screenOptions={defaultStackScreenOptions} initialRouteName="WalletExport">
|
||||
<WalletExportStack.Screen name="WalletExport" component={WalletExport} options={WalletExport.navigationOptions} />
|
||||
</WalletExportStack.Navigator>
|
||||
);
|
||||
|
||||
const LappBrowserStack = createStackNavigator();
|
||||
const LappBrowserStackRoot = () => (
|
||||
<LappBrowserStack.Navigator name="LappBrowserRoot" screenOptions={defaultStackScreenOptions} initialRouteName="LappBrowser">
|
||||
<LappBrowserStack.Screen name="LappBrowser" component={LappBrowser} options={LappBrowser.navigationOptions} />
|
||||
</LappBrowserStack.Navigator>
|
||||
);
|
||||
|
||||
const InitStack = createStackNavigator();
|
||||
const InitRoot = () => (
|
||||
<InitStack.Navigator screenOptions={defaultScreenOptions} initialRouteName="LoadingScreenRoot">
|
||||
@ -304,7 +332,7 @@ const Navigation = () => (
|
||||
<RootStack.Screen name="HodlHodlWebview" component={HodlHodlWebview} options={HodlHodlWebview.navigationOptions} />
|
||||
|
||||
{/* screens */}
|
||||
<RootStack.Screen name="WalletExport" component={WalletExport} options={WalletExport.navigationOptions} />
|
||||
<RootStack.Screen name="WalletExportRoot" component={WalletExportStackRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen
|
||||
name="ExportMultisigCoordinationSetup"
|
||||
component={ExportMultisigCoordinationSetup}
|
||||
@ -315,12 +343,12 @@ const Navigation = () => (
|
||||
component={ViewEditMultisigCosigners}
|
||||
options={ViewEditMultisigCosigners.navigationOptions}
|
||||
/>
|
||||
<RootStack.Screen name="WalletXpub" component={WalletXpub} options={WalletXpub.navigationOptions} />
|
||||
<RootStack.Screen name="WalletXpubRoot" component={WalletXpubStackRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="BuyBitcoin" component={BuyBitcoin} options={BuyBitcoin.navigationOptions} />
|
||||
<RootStack.Screen name="Marketplace" component={Marketplace} options={Marketplace.navigationOptions} />
|
||||
<RootStack.Screen name="SelectWallet" component={SelectWallet} options={{ headerLeft: null }} />
|
||||
<RootStack.Screen name="ReceiveDetails" component={ReceiveDetails} options={ReceiveDetails.navigationOptions} />
|
||||
<RootStack.Screen name="LappBrowser" component={LappBrowser} options={LappBrowser.navigationOptions} />
|
||||
<RootStack.Screen name="ReceiveDetailsRoot" component={ReceiveDetailsStackRoot} options={{ headerShown: false }} />
|
||||
<RootStack.Screen name="LappBrowserRoot" component={LappBrowserStackRoot} options={{ headerShown: false }} />
|
||||
|
||||
<RootStack.Screen
|
||||
name="ScanQRCodeRoot"
|
||||
|
@ -61,12 +61,12 @@ class DeeplinkSchemaMatch {
|
||||
]);
|
||||
} else if (action === 'openReceive') {
|
||||
completionHandler([
|
||||
'ReceiveDetailsRoot',
|
||||
{
|
||||
routeName: 'ReceiveDetails',
|
||||
screen: 'ReceiveDetails',
|
||||
params: {
|
||||
walletID: wallet.getID(),
|
||||
},
|
||||
name: 'ReceiveDetails',
|
||||
},
|
||||
]);
|
||||
}
|
||||
@ -232,12 +232,15 @@ class DeeplinkSchemaMatch {
|
||||
}
|
||||
|
||||
completionHandler([
|
||||
'LappBrowser',
|
||||
'LappBrowserRoot',
|
||||
{
|
||||
screen: 'LappBrowser',
|
||||
params: {
|
||||
fromSecret: lnWallet.getSecret(),
|
||||
fromWallet: lnWallet,
|
||||
url: urlObject.query.url,
|
||||
},
|
||||
},
|
||||
]);
|
||||
break;
|
||||
}
|
||||
|
@ -184,8 +184,11 @@ export default class LNDCreateInvoice extends Component {
|
||||
onSuccess: this.renderReceiveDetails,
|
||||
onFailure: () => {
|
||||
this.props.navigation.dangerouslyGetParent().pop();
|
||||
this.props.navigation.navigate('WalletExport', {
|
||||
this.props.navigation.navigate('WalletExportRoot', {
|
||||
screen: 'WalletExportRoot',
|
||||
params: {
|
||||
walletID: this.state.fromWallet.getID(),
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
@ -230,8 +230,11 @@ const ReceiveDetails = () => {
|
||||
onSuccess: obtainWalletAddress,
|
||||
onFailure: () => {
|
||||
goBack();
|
||||
navigate('WalletExport', {
|
||||
navigate('WalletExportRoot', {
|
||||
screen: 'WalletExport',
|
||||
params: {
|
||||
walletID: wallet.getID(),
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
@ -293,7 +293,6 @@ const styles = StyleSheet.create({
|
||||
CoinControl.navigationOptions = () => ({
|
||||
...BlueNavigationStyle(null, false),
|
||||
title: loc.cc.header,
|
||||
gestureEnabled: false,
|
||||
});
|
||||
|
||||
export default CoinControl;
|
||||
|
@ -63,7 +63,6 @@ export default class SendCreate extends Component {
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
alert(error.message);
|
||||
})
|
||||
.finally(() => {
|
||||
RNFS.unlink(filePath);
|
||||
|
@ -186,8 +186,11 @@ const WalletDetails = () => {
|
||||
}, [popToTop, wallet]);
|
||||
|
||||
const navigateToWalletExport = () => {
|
||||
navigate('WalletExport', {
|
||||
navigate('WalletExportRoot', {
|
||||
screen: 'WalletExport',
|
||||
params: {
|
||||
walletID: wallet.getID(),
|
||||
},
|
||||
});
|
||||
};
|
||||
const navigateToMultisigCoordinationSetup = () => {
|
||||
@ -201,8 +204,11 @@ const WalletDetails = () => {
|
||||
});
|
||||
};
|
||||
const navigateToXPub = () =>
|
||||
navigate('WalletXpub', {
|
||||
navigate('WalletXpubRoot', {
|
||||
screen: 'WalletXpub',
|
||||
params: {
|
||||
secret: wallet.getSecret(),
|
||||
},
|
||||
});
|
||||
|
||||
const renderMarketplaceButton = () => {
|
||||
|
@ -282,8 +282,11 @@ const WalletTransactions = () => {
|
||||
onPress={() => {
|
||||
setIsManageFundsModalVisible(false);
|
||||
|
||||
navigate('ReceiveDetails', {
|
||||
navigate('ReceiveDetailsRoot', {
|
||||
screen: 'ReceiveDetails',
|
||||
params: {
|
||||
walletID: wallet.current.getID(),
|
||||
},
|
||||
});
|
||||
}}
|
||||
title={loc.lnd.refill_external}
|
||||
@ -324,7 +327,10 @@ const WalletTransactions = () => {
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
if (wallet.current.type === LightningCustodianWallet.type) {
|
||||
navigate('LappBrowser', { fromSecret: wallet.current.getSecret(), fromWallet: wallet.current });
|
||||
navigate('LappBrowserRoot', {
|
||||
screen: 'LappBrowser',
|
||||
params: { fromSecret: wallet.current.getSecret(), fromWallet: wallet.current },
|
||||
});
|
||||
} else {
|
||||
navigate('Marketplace', { fromWallet: wallet.current });
|
||||
}
|
||||
@ -353,10 +359,13 @@ const WalletTransactions = () => {
|
||||
return (
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
navigate('LappBrowser', {
|
||||
navigate('LappBrowserRoot', {
|
||||
screen: 'LappBrowser',
|
||||
params: {
|
||||
fromSecret: wallet.current.getSecret(),
|
||||
fromWallet: wallet,
|
||||
url: 'https://duckduckgo.com',
|
||||
},
|
||||
});
|
||||
}}
|
||||
style={[styles.marketplaceButton2, stylesHook.marketplaceButton2]}
|
||||
@ -581,8 +590,11 @@ const WalletTransactions = () => {
|
||||
setIsManageFundsModalVisible(true);
|
||||
},
|
||||
onFailure: () =>
|
||||
navigate('WalletExport', {
|
||||
navigate('WalletExportRoot', {
|
||||
screen: 'WalletExport',
|
||||
params: {
|
||||
walletID: wallet.current.getID(),
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
@ -641,7 +653,7 @@ const WalletTransactions = () => {
|
||||
if (wallet.current.chain === Chain.OFFCHAIN) {
|
||||
navigate('LNDCreateInvoiceRoot', { screen: 'LNDCreateInvoice', params: { fromWallet: wallet.current } });
|
||||
} else {
|
||||
navigate('ReceiveDetails', { walletID: wallet.current.getID() });
|
||||
navigate('ReceiveDetailsRoot', { screen: 'ReceiveDetails', params: { walletID: wallet.current.getID() } });
|
||||
}
|
||||
}}
|
||||
icon={
|
||||
|
Loading…
Reference in New Issue
Block a user