Skip to content

Commit 12b99f1

Browse files
committed
fix(verifycontribution): fix issue with failing to deconstruct undefined object (vm)
1 parent 01a2b19 commit 12b99f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/backend/src/functions/circuit.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,9 @@ export const verifycontribution = functionsV2.https.onCall(
497497
verifyCloudFunction: avgVerifyCloudFunctionTime
498498
} = avgTimings
499499
const { cfOrVm, vm } = verification
500-
const { vmInstanceId } = vm
500+
// we might not have it if the circuit is not using VM.
501+
let vmInstanceId: string = ""
502+
if (vm) vmInstanceId = vm.vmInstanceId
501503

502504
// Define pre-conditions.
503505
const isFinalizing = state === CeremonyState.CLOSED && request.auth && request.auth.token.coordinator // true only when the coordinator verifies the final contributions.

0 commit comments

Comments
 (0)