Stop poll for checking balance if funds are sufficient
This commit is contained in:
parent
e7cd642242
commit
875a404702
@ -436,9 +436,10 @@ const Configure = () => {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (isAccountsDataReceived && !isBalanceSufficient) {
|
||||
if (isAccountsDataReceived) {
|
||||
checkBalance();
|
||||
|
||||
if (!isBalanceSufficient) {
|
||||
const interval = setInterval(() => {
|
||||
checkBalance();
|
||||
}, CHECK_BALANCE_INTERVAL);
|
||||
@ -447,12 +448,8 @@ const Configure = () => {
|
||||
clearInterval(interval);
|
||||
};
|
||||
}
|
||||
}, [
|
||||
amountToBePaid,
|
||||
selectedAccount,
|
||||
selectedDeployer,
|
||||
isAccountsDataReceived,
|
||||
]);
|
||||
}
|
||||
}, [isAccountsDataReceived, isBalanceSufficient, checkBalance]);
|
||||
|
||||
return (
|
||||
<div className="space-y-7 px-4 py-6">
|
||||
|
Loading…
Reference in New Issue
Block a user