laconic-wallet/components/InvalidPath.tsx
Adwait Gharpure 7db0edce75
Allow incoming signature requests from intents (#32)
* Add url scheme and linking

* Pass account to sign request page

* Provide functionality for accepting or rejecting requests

* Load account state before handling url

* Refactor code

* Make intent work when app is cleared from recents

* Fix bug to populate data from intents

* Fix bug to update data on subsequent requests

* Pass correct network to sign messages from cosmos account

* Fix bug to populate data for incoming intent

* Allow spaces in url

* Bad signature page

* Review changes

* Change page heading

* Use correct regex

* Clean up code

* Use https in url

* Set state properly

---------

Co-authored-by: Adw8 <adwait@deepstacksoft.com>
2024-02-28 19:37:26 +05:30

29 lines
787 B
TypeScript

import React from 'react';
import { View, Text } from 'react-native';
import { Button } from 'react-native-paper';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { useNavigation } from '@react-navigation/native';
import { StackParamsList } from '../types';
import styles from '../styles/stylesheet';
const InvalidPath = () => {
const navigation =
useNavigation<NativeStackNavigationProp<StackParamsList>>();
return (
<View style={styles.badRequestContainer}>
<Text style={styles.messageText}>The signature request was invalid.</Text>
<Button
mode="contained"
onPress={() => {
navigation.navigate('Laconic');
}}>
Home
</Button>
</View>
);
};
export default InvalidPath;