Poll for balance in create project page
This commit is contained in:
parent
ffa23fc874
commit
588ba22ee6
@ -41,6 +41,7 @@ type ConfigureFormValues = ConfigureDeploymentFormValues &
|
||||
|
||||
const DEFAULT_MAX_PRICE = '10000';
|
||||
const TX_APPROVAL_TIMEOUT_MS = 60000;
|
||||
const CHECK_BALANCE_INTERVAL = 5000;
|
||||
|
||||
const Configure = () => {
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
@ -424,6 +425,14 @@ const Configure = () => {
|
||||
useEffect(() => {
|
||||
if (isAccountsDataReceived) {
|
||||
checkBalance();
|
||||
|
||||
const interval = setInterval(() => {
|
||||
checkBalance();
|
||||
}, CHECK_BALANCE_INTERVAL);
|
||||
|
||||
return () => {
|
||||
clearInterval(interval);
|
||||
};
|
||||
}
|
||||
}, [amountToBePaid, selectedAccount, selectedDeployer, isAccountsDataReceived]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user