From 9d9883727473a866770dfd1421d2f0b4bf926a9b Mon Sep 17 00:00:00 2001
From: Will Kim <william.kim@ey.com>
Date: Tue, 24 Sep 2019 14:06:34 -0400
Subject: [PATCH] fix: fixed incorrect file check for generateProof

---
 lib/generate-proof.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/generate-proof.js b/lib/generate-proof.js
index 1532022..764a3af 100644
--- a/lib/generate-proof.js
+++ b/lib/generate-proof.js
@@ -38,7 +38,7 @@ async function generateProof(provingKeyPath, codePath, provingScheme, options) {
     throw new Error('generate-proof proving key path file not found');
   }
 
-  if (!codePath.endsWith('.code')) {
+  if (codePath.endsWith('.code')) {
     throw new Error("Expected the compiled code that didn't end in .code");
   }