forked from cerc-io/laconic-wallet
Prevent infinite re-render of signRequest page
This commit is contained in:
parent
36c3adb1b1
commit
3bb358ca55
@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { Alert, Image, ScrollView, View } from 'react-native';
|
||||
import { ActivityIndicator, Button, Text, Appbar } from 'react-native-paper';
|
||||
import { SvgUri } from 'react-native-svg';
|
||||
import _ from 'lodash';
|
||||
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import {
|
||||
@ -88,7 +89,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