Prevent infinite re-render of signRequest page

This commit is contained in:
Shreerang Kale 2024-07-31 13:56:02 +05:30
parent cd0f6fa5d2
commit 04f47c8c95

View File

@ -1,6 +1,7 @@
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 {
@ -86,7 +87,7 @@ const SignRequest = ({ route }: SignRequestProps) => {
return;
}
if (requestAccount !== account) {
if (_.isEqual(requestAccount, account)) {
setAccount(requestAccount);
}
if (requestMessage !== message) {