Stop poll for checking balance if funds are sufficient

This commit is contained in:
IshaVenikar 2025-02-11 14:56:07 +05:30
parent e7cd642242
commit 875a404702

View File

@ -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">