Skip to content

Commit

Permalink
fix(providers): return error instead of throwing exception in `AnvilB…
Browse files Browse the repository at this point in the history
…uilder#spawn` method
  • Loading branch information
ArtificialPB committed Sep 16, 2024
1 parent 3be33ff commit faa3be3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class AnvilBuilder {
do {
val hexKey = line.split(" ")[1]
if (hexKey.length != 66 || !FastHex.isValidHex(hexKey)) {
throw IllegalStateException("Invalid private key format: $hexKey")
return failure(Error.SpawnError("Invalid private key format: $hexKey"))
}

accounts.add(PrivateKeySigner(hexKey))
Expand Down

0 comments on commit faa3be3

Please sign in to comment.