Skip to content

Commit d03f0d4

Browse files
Mani BrarMani Brar
authored andcommitted
fix: review fixes
1 parent 228a783 commit d03f0d4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

validator-cli/src/utils/epochHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const getLatestChallengeableEpoch = (epochPeriod: number, now: number = Date.now
6464
*/
6565
const getBlockFromEpoch = async (epoch: number, epochPeriod: number, provider: JsonRpcProvider): Promise<number> => {
6666
const epochTimestamp = epoch * epochPeriod;
67-
const latestBlock = await provider.getBlock("final");
67+
const latestBlock = await provider.getBlock("finalized");
6868
const baseBlock = await provider.getBlock(latestBlock.number - 500);
6969
const secPerBlock = (latestBlock.timestamp - baseBlock.timestamp) / (latestBlock.number - baseBlock.number);
7070
const blockFallBack = Math.floor((latestBlock.timestamp - epochTimestamp) / secPerBlock);

validator-cli/src/utils/graphQueries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ const getSnapshotSentForEpoch = async (
154154
epoch: number,
155155
veaInbox: string,
156156
chainId: number
157-
): Promise<{ txHash: string }> => {
157+
): Promise<{ txHash: string } | undefined> => {
158158
try {
159159
const subgraph = getInboxSubgraphUrl(chainId);
160160

validator-cli/src/utils/transactionHandlers/arbToGnosisHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class ArbToGnosisTransactionHandler extends BaseTransactionHandler<VeaInb
3333
const currentAllowance: bigint = await weth.allowance(signer.address, veaOutbox.address);
3434
if (currentAllowance < deposit) {
3535
const approvalAmount = deposit * BigInt(10); // Approving for 10 claims
36-
const approveTx = await weth.approve(routeConfig[Network.TESTNET].veaOutbox.address, deposit * approvalAmount);
36+
const approveTx = await weth.approve(routeConfig[Network.TESTNET].veaOutbox.address, approvalAmount);
3737
await approveTx.wait();
3838
}
3939
}

0 commit comments

Comments
 (0)