Skip to content

Commit

Permalink
Update proof not found error message (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
heliuchuan authored Oct 3, 2024
1 parent 3254f59 commit 2d37ce5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/account/KeylessAccountCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export abstract class KeylessAccountCommon extends Serializable implements Accou
throw new Error("EphemeralKeyPair is expired");
}
if (this.proof === undefined) {
throw new Error("Proof not defined");
throw new Error("Proof not found - make sure to call `await account.waitForProofFetch()` before signing.");
}
const ephemeralPublicKey = this.ephemeralKeyPair.getPublicKey();
const ephemeralSignature = this.ephemeralKeyPair.sign(data);
Expand All @@ -239,7 +239,7 @@ export abstract class KeylessAccountCommon extends Serializable implements Accou
*/
signTransaction(transaction: AnyRawTransaction): KeylessSignature {
if (this.proof === undefined) {
throw new Error("Proof not found");
throw new Error("Proof not found - make sure to call `await account.waitForProofFetch()` before signing.");
}
const raw = deriveTransactionType(transaction);
const txnAndProof = new TransactionAndProof(raw, this.proof.proof);
Expand Down

0 comments on commit 2d37ce5

Please sign in to comment.