Skip to content

Commit

Permalink
chore: remove duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
antomor committed Aug 29, 2024
1 parent 6dd9d55 commit b33c07e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/KeyManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,7 @@ export class KeyManager {
address: string,
utx: PopulatedTransaction
): Promise<SignedTransactionDetails> {
ow(address, ow.string);
const privateKey = this._privateKeys[address];
if (privateKey === undefined) {
throw new Error(`Can't sign: signer=${address} is not managed`);
}

const signer = new Wallet(privateKey);
const signer = this.getWallet(address);
const signedTx = await signer.signTransaction(utx);

const txHash = utils.keccak256(signedTx);
Expand Down

0 comments on commit b33c07e

Please sign in to comment.