Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
heliuchuan committed Dec 3, 2024
1 parent b764949 commit 3b45a87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
17 changes: 0 additions & 17 deletions src/core/crypto/signatureUtils.ts

This file was deleted.

6 changes: 4 additions & 2 deletions src/core/crypto/singleKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { Secp256k1PublicKey, Secp256k1Signature } from "./secp256k1";
import { KeylessPublicKey, KeylessSignature } from "./keyless";
import { Signature } from "./signature";
import { FederatedKeylessPublicKey } from "./federatedKeyless";
import { toSecp256k1Signature } from "./signatureUtils";

/**
* Represents any public key supported by Aptos.
Expand Down Expand Up @@ -204,8 +203,11 @@ export class AnyPublicKey extends AccountPublicKey {
recoveryBit: number;
}): AnyPublicKey {
const { signature, message, recoveryBit } = args;
if (!Secp256k1Signature.isInstance(signature.signature)) {
throw new Error("AnySignature variant is not Secp256k1");
}
const publicKey = Secp256k1PublicKey.fromSignatureAndMessage({
signature: toSecp256k1Signature(signature),
signature: signature.signature,
message,
recoveryBit,
});
Expand Down

0 comments on commit 3b45a87

Please sign in to comment.