Remove path config used for deep links

This commit is contained in:
Shreerang Kale 2024-07-31 18:59:16 +05:30
parent 04f47c8c95
commit ce462f3ad2
2 changed files with 8 additions and 24 deletions

View File

@ -15,14 +15,7 @@ import { WalletConnectProvider } from './context/WalletConnectContext';
globalThis.Buffer = Buffer;
const linking = {
prefixes: ['https://wallet.laconic.com'],
config: {
screens: {
SignRequest: {
path: 'sign/:namespace/:chaindId/:address/:message',
},
},
},
prefixes: ['https://wallet.laconic.com']
};
const theme = {

View File

@ -1,7 +1,6 @@
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { Image, ScrollView, View } from 'react-native';
import { ActivityIndicator, Button, Text, Appbar } from 'react-native-paper';
import _ from 'lodash';
import { useNavigation } from '@react-navigation/native';
import {
@ -50,7 +49,7 @@ const SignRequest = ({ route }: SignRequestProps) => {
const isCosmosSignDirect = useMemo(() => {
const requestParams = route.params.requestEvent;
if (!requestParams) {
if (!requestParams?.id) {
return false;
}
@ -60,7 +59,7 @@ const SignRequest = ({ route }: SignRequestProps) => {
const isEthSendTransaction = useMemo(() => {
const requestParams = route.params.requestEvent;
if (!requestParams) {
if (!requestParams?.id) {
return false;
}
@ -87,21 +86,13 @@ const SignRequest = ({ route }: SignRequestProps) => {
return;
}
if (_.isEqual(requestAccount, account)) {
setAccount(requestAccount);
}
if (requestMessage !== message) {
setMessage(decodeURIComponent(requestMessage));
}
if (requestNamespace !== namespace) {
setNamespace(requestNamespace);
}
if (requestChainId !== chainId) {
setChainId(requestChainId);
}
setAccount(requestAccount);
setMessage(decodeURIComponent(requestMessage));
setNamespace(requestNamespace);
setChainId(requestChainId);
setIsLoading(false);
},
[account, message, navigation, namespace, chainId],
[navigation],
);
const sanitizePath = useCallback(