Skip to content

Commit a8942cd

Browse files
committed
fix: add shutter api check
1 parent 3080c8f commit a8942cd

File tree

1 file changed

+4
-0
lines changed
  • web/src/pages/Cases/CaseDetails/Voting/Shutter

1 file changed

+4
-0
lines changed

web/src/pages/Cases/CaseDetails/Voting/Shutter/Commit.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ const Commit: React.FC<ICommit> = ({
8585

8686
const handleCommit = useCallback(
8787
async (choice: bigint) => {
88+
if (!import.meta.env.REACT_APP_SHUTTER_API) {
89+
console.error("REACT_APP_SHUTTER_API environment variable is not set");
90+
throw new Error("Cannot commit vote: REACT_APP_SHUTTER_API environment variable is required but not set");
91+
}
8892
const message = { message: saltKey };
8993
const rawSalt = !isUndefined(signingAccount)
9094
? await signingAccount.signMessage(message)

0 commit comments

Comments
 (0)