Change first page url to Home

This commit is contained in:
IshaVenikar 2024-07-29 14:38:05 +05:30
parent e8535fbdd5
commit 745cbc0cce
8 changed files with 17 additions and 16 deletions

View File

@ -223,12 +223,13 @@ const App = (): React.JSX.Element => {
}}
>
<Stack.Screen
name="Laconic"
name="Home"
component={HomeScreen}
options={{
// eslint-disable-next-line react/no-unstable-nested-components
headerTitle: () => <Text variant="titleLarge">Laconic Wallet</Text>,
}} />
}}
/>
<Stack.Screen
name="SignMessage"
component={SignMessage}

View File

@ -198,7 +198,7 @@ const AddNetwork = () => {
),
]);
navigation.navigate('Laconic');
navigation.navigate('Home');
},
[navigation, namespace, setNetworksData],
);

View File

@ -214,7 +214,7 @@ const ApproveTransaction = ({ route }: ApproveTransactionProps) => {
await web3wallet!.respondSessionRequest({ topic, response });
setIsRequestAccepted(false);
navigation.navigate('Laconic');
navigation.navigate('Home');
} catch (error) {
if (!(error instanceof Error)) {
throw error;
@ -234,7 +234,7 @@ const ApproveTransaction = ({ route }: ApproveTransactionProps) => {
response,
});
navigation.navigate('Laconic');
navigation.navigate('Home');
};
return (
@ -301,7 +301,7 @@ const ApproveTransaction = ({ route }: ApproveTransactionProps) => {
visible={isTxErrorDialogOpen}
hideDialog={async () => {
setIsTxErrorDialogOpen(false);
navigation.navigate('Laconic');
navigation.navigate('Home');
}}
/>
</>

View File

@ -336,7 +336,7 @@ const ApproveTransfer = ({ route }: SignRequestProps) => {
const { topic } = requestEvent;
await web3wallet!.respondSessionRequest({ topic, response });
navigation.navigate('Laconic');
navigation.navigate('Home');
} catch (error) {
if (!(error instanceof Error)) {
throw error;
@ -356,7 +356,7 @@ const ApproveTransfer = ({ route }: SignRequestProps) => {
response,
});
navigation.navigate('Laconic');
navigation.navigate('Home');
};
useEffect(() => {
@ -404,7 +404,7 @@ const ApproveTransfer = ({ route }: SignRequestProps) => {
<Appbar.BackAction
onPress={async () => {
await rejectRequestHandler();
navigation.navigate('Laconic');
navigation.navigate('Home');
}}
/>
)}
@ -660,7 +660,7 @@ const ApproveTransfer = ({ route }: SignRequestProps) => {
setIsTxErrorDialogOpen(false);
if (!isSufficientFunds || !balance || !fees) {
rejectRequestHandler();
navigation.navigate('Laconic');
navigation.navigate('Home');
}
}}
/>

View File

@ -90,7 +90,7 @@ const EditNetwork = ({ route }: EditNetworkProps) => {
setNetworksData(retrievedNetworksData);
navigation.navigate('Laconic');
navigation.navigate('Home');
},
[networkData, navigation, setNetworksData],
);

View File

@ -19,7 +19,7 @@ const InvalidPath = () => {
<Button
mode="contained"
onPress={() => {
navigation.navigate('Laconic');
navigation.navigate('Home');
}}>
Home
</Button>

View File

@ -222,7 +222,7 @@ const SignRequest = ({ route }: SignRequestProps) => {
}
setIsApproving(false);
navigation.navigate('Laconic');
navigation.navigate('Home');
};
const rejectRequestHandler = async () => {
@ -237,7 +237,7 @@ const SignRequest = ({ route }: SignRequestProps) => {
}
setIsRejecting(false);
navigation.navigate('Laconic');
navigation.navigate('Home');
};
useEffect(() => {
@ -252,7 +252,7 @@ const SignRequest = ({ route }: SignRequestProps) => {
<Appbar.BackAction
onPress={async () => {
await rejectRequestHandler();
navigation.navigate('Laconic');
navigation.navigate('Home');
}}
/>
)}

View File

@ -5,7 +5,7 @@ import { Web3WalletTypes } from '@walletconnect/web3wallet';
import { EncodeObject } from '@cosmjs/proto-signing';
export type StackParamsList = {
Laconic: undefined;
Home: undefined;
SignMessage: {
selectedNamespace: string;
selectedChainId: string;