Skip to content

Commit

Permalink
Also handle 1559 feeHistory endpoint not being whitelisted via RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
ligi committed Jan 5, 2022
1 parent 61828db commit d4ed950
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/org/komputing/fauceth/TransactionSender.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ suspend fun sendTransaction(address: Address, txChain: ExtendedChainInfo): Strin
}
if (txChain.useEIP1559) {
val handle1559NotAvailable: RetryPolicy<Throwable> = {
if (reason is EthereumRPCException && reason.message == "the method eth_feeHistory does not exist/is not available") StopRetrying else ContinueRetrying
if (reason is EthereumRPCException && (reason.message == "the method eth_feeHistory does not exist/is not available") || (reason.message == "rpc method is not whitelisted")) StopRetrying else ContinueRetrying
}

try {
Expand Down

0 comments on commit d4ed950

Please sign in to comment.