From 92ec23d9995a8a58017f74e4a01a51b5dd995e30 Mon Sep 17 00:00:00 2001 From: Oliver He Date: Wed, 2 Oct 2024 15:06:28 -0400 Subject: [PATCH] Update proof not found error message --- src/account/KeylessAccountCommon.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/account/KeylessAccountCommon.ts b/src/account/KeylessAccountCommon.ts index d91286239..c204f8e7c 100644 --- a/src/account/KeylessAccountCommon.ts +++ b/src/account/KeylessAccountCommon.ts @@ -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); @@ -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);