Prevent infinite re-render of signRequest page
This commit is contained in:
parent
cd0f6fa5d2
commit
04f47c8c95
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user