Skip to content

Commit

Permalink
Remove a workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
alcuadrado committed Apr 5, 2021
1 parent 23737e2 commit 2137c4a
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,9 @@ function isRpcHashString(u: unknown): u is string {
}

function isRpcAddressString(u: unknown): u is string {
return typeof u === "string" && safeIsValidAddress(u);
return typeof u === "string" && isValidAddress(u);
}

function isInteger(num: unknown): num is number {
return Number.isInteger(num);
}

function safeIsValidAddress(u: string) {
let isValid = false;
// This try catch should be here until this is released: https://github.com/ethereumjs/ethereumjs-monorepo/pull/1174
try {
isValid = isValidAddress(u);
} catch (e) {}
return isValid;
}

0 comments on commit 2137c4a

Please sign in to comment.