Skip to content

Commit

Permalink
don't throw errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mouseless0x committed Dec 4, 2024
1 parent 07d779f commit d9a6872
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
10 changes: 2 additions & 8 deletions src/executor/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,8 @@ export class Executor {
): Promise<ReplaceTransactionResult> {
const newRequest = { ...transactionInfo.transactionRequest }

let gasPriceParameters
try {
gasPriceParameters = await this.gasPriceManager.getNetworkGasPrice()
} catch (err) {
this.logger.error({ error: err }, "Failed to get network gas price")
this.markWalletProcessed(transactionInfo.executor)
return { status: "failed" }
}
const gasPriceParameters =
await this.gasPriceManager.getNetworkGasPrice()

newRequest.maxFeePerGas = maxBigInt(
gasPriceParameters.maxFeePerGas,
Expand Down
10 changes: 2 additions & 8 deletions src/handlers/gasPriceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,7 @@ export class GasPriceManager {
} catch (e) {
this.logger.error("failed to get fallback maxPriorityFeePerGas")
sentry.captureException(e)
return {
maxPriorityFeePerGas: parseGwei("1"),
maxFeePerGas: parseGwei("1")
}
maxPriorityFeePerGas = parseGwei("1")
}
}

Expand All @@ -288,10 +285,7 @@ export class GasPriceManager {
} catch (e) {
this.logger.error("failed to get fallback maxFeePerGas")
sentry.captureException(e)
return {
maxPriorityFeePerGas: parseGwei("1"),
maxFeePerGas: parseGwei("1")
}
maxFeePerGas = parseGwei("1")
}
}

Expand Down

0 comments on commit d9a6872

Please sign in to comment.