Skip to content

Commit

Permalink
chore(casper): disable balance checking for casper
Browse files Browse the repository at this point in the history
  • Loading branch information
D4mph1r committed Dec 10, 2024
1 parent fc83b5b commit e38a978
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions src/balances/chains-balance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,25 @@ export async function requireEnoughBalanceInChains(
).flat();
let funded = false;
for (const chain of notValidatorChains) {
while (!funded) {
const balance = await chain.getBalance();
const remainingRaw = chain.initialFunds - BigInt(balance);
if (balance < chain.initialFunds) {
log.error(
`Balance: ${formatEther(balance)}. Fund wallet ${chain.address} on ${
chain.chainIdent
} with ${Number(remainingRaw) / Number(chain.decimals)} ${
chain.currency
}.`,
);
// Sleep for 10 Seconds
await stdio.question("Press Enter to continue...");
continue;
if (chain.chainType !== "casper") {
while (!funded) {
const balance = await chain.getBalance();
const remainingRaw = chain.initialFunds - BigInt(balance);
if (balance < chain.initialFunds) {
log.error(
`Balance: ${formatEther(balance)}. Fund wallet ${chain.address} on ${
chain.chainIdent
} with ${Number(remainingRaw) / Number(chain.decimals)} ${
chain.currency
}.`,
);
// Sleep for 10 Seconds
await stdio.question("Press Enter to continue...");
continue;
}
funded = true;
log.info(`${chain.chainIdent} Has Enough Funds: ✅`);
}
funded = true;
log.info(`${chain.chainIdent} Has Enough Funds: ✅`);
}
}
return notValidatorChains;
Expand Down

0 comments on commit e38a978

Please sign in to comment.