diff --git a/src/App.tsx b/src/App.tsx index 031b301..07f5ba4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -203,6 +203,7 @@ const App = (): React.JSX.Element => { name="Laconic" component={HomeScreen} options={{ + // eslint-disable-next-line react/no-unstable-nested-components headerTitle: () => Laconic Wallet, headerBackVisible: false, }} @@ -211,6 +212,7 @@ const App = (): React.JSX.Element => { name="SignMessage" component={SignMessage} options={{ + // eslint-disable-next-line react/no-unstable-nested-components headerTitle: () => Sign Message, }} /> @@ -218,6 +220,7 @@ const App = (): React.JSX.Element => { name="SignRequest" component={SignRequest} options={{ + // eslint-disable-next-line react/no-unstable-nested-components headerTitle: () => Sign Request, }} /> @@ -225,6 +228,7 @@ const App = (): React.JSX.Element => { name="InvalidPath" component={InvalidPath} options={{ + // eslint-disable-next-line react/no-unstable-nested-components headerTitle: () => Bad Request, headerBackVisible: false, }} @@ -233,7 +237,9 @@ const App = (): React.JSX.Element => { name="WalletConnect" component={WalletConnect} options={{ + // eslint-disable-next-line react/no-unstable-nested-components headerTitle: () => WalletConnect, + // eslint-disable-next-line react/no-unstable-nested-components headerRight: () => ( diff --git a/src/components/NetworkDropdown.tsx b/src/components/NetworkDropdown.tsx index c1a0a34..9c9fc7c 100644 --- a/src/components/NetworkDropdown.tsx +++ b/src/components/NetworkDropdown.tsx @@ -11,9 +11,9 @@ const NetworkDropdown = ({ updateNetwork }: NetworkDropdownProps) => { const [expanded, setExpanded] = useState(false); - const handleNetworkPress = (networksData: NetworksDataState) => { - updateNetwork(networksData); - setSelectedNetwork(networksData); + const handleNetworkPress = (networkData: NetworksDataState) => { + updateNetwork(networkData); + setSelectedNetwork(networkData); setExpanded(false); }; diff --git a/src/components/PairingModal.tsx b/src/components/PairingModal.tsx index a9b0b90..d29bc6a 100644 --- a/src/components/PairingModal.tsx +++ b/src/components/PairingModal.tsx @@ -172,7 +172,7 @@ const PairingModal = ({ return ( - + diff --git a/src/screens/AddNetwork.tsx b/src/screens/AddNetwork.tsx index 3ddb10c..6562d48 100644 --- a/src/screens/AddNetwork.tsx +++ b/src/screens/AddNetwork.tsx @@ -156,7 +156,6 @@ const AddNetwork = () => { }, [namespace, reset]); return ( - // TODO: get form data from json file @@ -171,7 +170,7 @@ const AddNetwork = () => { value={value} label="Chain ID" onBlur={onBlur} - onChangeText={value => onChange(value)} + onChangeText={textValue => onChange(textValue)} /> {errors.chainId?.message} @@ -188,7 +187,7 @@ const AddNetwork = () => { label="Network Name" value={value} onBlur={onBlur} - onChangeText={value => onChange(value)} + onChangeText={textValue => onChange(textValue)} /> {errors.networkName?.message} @@ -205,7 +204,7 @@ const AddNetwork = () => { label="New RPC URL" onBlur={onBlur} value={value} - onChangeText={value => onChange(value)} + onChangeText={textValue => onChange(textValue)} /> {errors.rpcUrl?.message} @@ -223,7 +222,7 @@ const AddNetwork = () => { value={value} label="Block Explorer URL (Optional)" onBlur={onBlur} - onChangeText={value => onChange(value)} + onChangeText={textValue => onChange(textValue)} /> {errors.blockExplorerUrl?.message} @@ -260,7 +259,7 @@ const AddNetwork = () => { value={value} label="Currency Symbol" onBlur={onBlur} - onChangeText={value => onChange(value)} + onChangeText={textValue => onChange(textValue)} /> {errors.currencySymbol?.message} @@ -281,7 +280,7 @@ const AddNetwork = () => { value={value} label="Native Denom" onBlur={onBlur} - onChangeText={value => onChange(value)} + onChangeText={textValue => onChange(textValue)} /> {errors.nativeDenom?.message} @@ -300,7 +299,7 @@ const AddNetwork = () => { value={value} label="Address Prefix" onBlur={onBlur} - onChangeText={value => onChange(value)} + onChangeText={textValue => onChange(textValue)} /> {errors.addressPrefix?.message} diff --git a/src/screens/AddSession.tsx b/src/screens/AddSession.tsx index 723298e..a54c006 100644 --- a/src/screens/AddSession.tsx +++ b/src/screens/AddSession.tsx @@ -102,7 +102,7 @@ const AddSession = () => { value={currentWCURI} numberOfLines={4} multiline={true} - style={{ padding: 10 }} + style={styles.walletConnectUriText} /> diff --git a/src/screens/ApproveTransaction.tsx b/src/screens/ApproveTransaction.tsx index d6412dd..b428b2f 100644 --- a/src/screens/ApproveTransaction.tsx +++ b/src/screens/ApproveTransaction.tsx @@ -175,7 +175,10 @@ const ApproveTransaction = ({ route }: SignRequestProps) => { }; useEffect(() => { - const getAccountBalance = async (account: Account) => { + const getAccountBalance = async () => { + if (!account) { + return; + } if (namespace === EIP155) { const fetchedBalance = provider && (await provider.getBalance(account.address)); @@ -191,9 +194,7 @@ const ApproveTransaction = ({ route }: SignRequestProps) => { } }; - if (account) { - getAccountBalance(account); - } + getAccountBalance(); }, [account, provider, namespace, cosmosStargateClient, requestedChain]); useEffect(() => { diff --git a/src/screens/HomeScreen.tsx b/src/screens/HomeScreen.tsx index b6db8be..453e29b 100644 --- a/src/screens/HomeScreen.tsx +++ b/src/screens/HomeScreen.tsx @@ -22,7 +22,7 @@ import { useNetworks } from '../context/NetworksContext'; const WCLogo = () => { return ( ); @@ -40,6 +40,7 @@ const HomeScreen = () => { useEffect(() => { if (accounts.length > 0) { navigation.setOptions({ + // eslint-disable-next-line react/no-unstable-nested-components headerRight: () => (