Skip to content

Commit

Permalink
lint:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Jun 10, 2024
1 parent a91ee9f commit 0f986ad
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/keyring-controller/src/KeyringController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1004,16 +1004,15 @@ export class KeyringController extends BaseController<

privateKey = remove0x(prefixed);
break;
case 'json':
{
case 'json': {
const getWallet = async (): Promise<Wallet> => {
const [input, password] = args;
try {
return importers.fromEtherWallet(input, password);
} catch (e) {
return Wallet.fromV3(input, password, true);
}
}
};
const wallet = await getWallet();
privateKey = bytesToHex(wallet.getPrivateKey());
break;
Expand Down

0 comments on commit 0f986ad

Please sign in to comment.