Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pxrl committed Oct 6, 2023
1 parent e265904 commit 204e1fe
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/utils/SignerUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ async function getSecretSigner(): Promise<Wallet> {
try {
secret = await readFile(SECRET, { encoding: "utf8" });
secret = secret.trim().replace("\n", "");
return /^0x[0-9a-f]{64}$/.test(secret)
? new Wallet(secret)
: Wallet.fromMnemonic(secret);
return /^0x[0-9a-f]{64}$/.test(secret) ? new Wallet(secret) : Wallet.fromMnemonic(secret);
} catch (err) {
const msg = typeguards.isError(err) ? err.message : "unknown error";
throw new Error(`Unable to load secret (${SECRET}: ${msg})`);
Expand Down

0 comments on commit 204e1fe

Please sign in to comment.