BlueWallet/navigation/AddWalletStack.tsx

131 lines
3.9 KiB
TypeScript
Raw Normal View History

2024-05-05 16:33:06 -04:00
import { createNativeStackNavigator } from '@react-navigation/native-stack';
2024-05-20 10:54:13 +01:00
import React from 'react';
import navigationStyle, { CloseButtonPosition } from '../components/navigationStyle';
2024-05-20 10:54:13 +01:00
import { useTheme } from '../components/themes';
import loc from '../loc';
2024-05-05 16:33:06 -04:00
import {
AddComponent,
ImportCustomDerivationPathComponent,
2024-05-20 10:54:13 +01:00
ImportSpeedComponent,
2024-05-05 18:37:01 -04:00
ImportWalletComponent,
2024-05-20 10:54:13 +01:00
ImportWalletDiscoveryComponent,
2024-05-05 16:33:06 -04:00
PleaseBackupComponent,
2024-05-20 10:54:13 +01:00
PleaseBackupLNDHubComponent,
2024-05-05 16:33:06 -04:00
ProvideEntropyComponent,
WalletsAddMultisigComponent,
WalletsAddMultisigHelpComponent,
2024-05-20 10:54:13 +01:00
WalletsAddMultisigStep2Component,
2024-05-05 16:33:06 -04:00
} from './LazyLoadAddWalletStack';
2024-07-14 10:25:35 -04:00
export type AddWalletStackParamList = {
AddWallet: undefined;
ImportWallet: undefined;
2024-10-05 10:13:46 -04:00
ImportWalletDiscovery: {
importText: string;
askPassphrase: boolean;
searchAccounts: boolean;
};
2024-07-14 10:25:35 -04:00
ImportSpeed: undefined;
2024-10-05 10:13:46 -04:00
ImportCustomDerivationPath: {
importText: string;
password: string | undefined;
};
2024-07-14 10:25:35 -04:00
PleaseBackup: undefined;
PleaseBackupLNDHub: undefined;
ProvideEntropy: undefined;
WalletsAddMultisig: {
walletLabel: string;
};
WalletsAddMultisigStep2: {
m: number;
n: number;
walletLabel: string;
format: string;
};
WalletsAddMultisigHelp: undefined;
};
2024-05-05 16:33:06 -04:00
const Stack = createNativeStackNavigator<AddWalletStackParamList>();
const AddWalletStack = () => {
const theme = useTheme();
return (
<Stack.Navigator initialRouteName="AddWallet">
<Stack.Screen
name="AddWallet"
component={AddComponent}
options={navigationStyle({
closeButtonPosition: CloseButtonPosition.Left,
2024-05-05 16:33:06 -04:00
title: loc.wallets.add_title,
})(theme)}
/>
<Stack.Screen name="ImportCustomDerivationPath" component={ImportCustomDerivationPathComponent} />
<Stack.Screen
2024-05-05 18:37:01 -04:00
name="ImportWallet"
component={ImportWalletComponent}
2024-05-05 16:33:06 -04:00
options={navigationStyle({ title: loc.wallets.import_title })(theme)}
2024-05-05 23:11:29 -04:00
/>
<Stack.Screen
name="ImportSpeed"
component={ImportSpeedComponent}
options={navigationStyle({ statusBarStyle: 'light', title: loc.wallets.import_title })(theme)}
2024-05-05 16:33:06 -04:00
/>
2024-05-05 18:37:01 -04:00
<Stack.Screen
name="ImportWalletDiscovery"
component={ImportWalletDiscoveryComponent}
options={navigationStyle({
title: loc.wallets.import_discovery_title,
})(theme)}
/>
2024-05-05 16:33:06 -04:00
<Stack.Screen
name="PleaseBackup"
component={PleaseBackupComponent}
options={navigationStyle({
gestureEnabled: false,
headerBackVisible: false,
title: loc.pleasebackup.title,
})(theme)}
/>
<Stack.Screen
name="PleaseBackupLNDHub"
component={PleaseBackupLNDHubComponent}
options={navigationStyle({ gestureEnabled: false, headerBackVisible: false, title: loc.pleasebackup.title })(theme)}
/>
<Stack.Screen
name="ProvideEntropy"
component={ProvideEntropyComponent}
options={navigationStyle({ title: loc.entropy.title })(theme)}
/>
2024-07-14 10:25:35 -04:00
<Stack.Screen
name="WalletsAddMultisig"
component={WalletsAddMultisigComponent}
options={navigationStyle({ title: '' })(theme)}
initialParams={{ walletLabel: loc.multisig.default_label }}
/>
2024-05-05 16:33:06 -04:00
<Stack.Screen
name="WalletsAddMultisigStep2"
component={WalletsAddMultisigStep2Component}
options={navigationStyle({ title: '', gestureEnabled: false })(theme)}
/>
<Stack.Screen
name="WalletsAddMultisigHelp"
component={WalletsAddMultisigHelpComponent}
options={navigationStyle({
title: '',
gestureEnabled: false,
headerStyle: {
backgroundColor: '#0070FF',
},
headerTintColor: '#FFFFFF',
headerBackTitleVisible: false,
statusBarStyle: 'light',
headerShadowVisible: false,
})(theme)}
/>
</Stack.Navigator>
);
};
export default AddWalletStack;