Skip to content

Commit eb30f37

Browse files
committed
refactor: remove unnecessary assertion
1 parent 0f4cb48 commit eb30f37

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lib/mina/v1/transaction-validation.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,10 @@ async function verifyAccountUpdate(
244244
};
245245

246246
let verificationKeyRaw = account.zkapp?.verificationKey;
247-
assert(verificationKeyRaw !== undefined, 'Account does not have a verification key');
248-
let verificationKey = verificationKeyRaw.data;
247+
let verificationKey = verificationKeyRaw?.data;
249248
assert(verificationKey !== undefined, 'Account does not have a verification key');
250249

251-
const isVkValid = await checkVkValidity(verificationKeyRaw);
250+
const isVkValid = await checkVkValidity(verificationKeyRaw!);
252251
if (!isVkValid)
253252
throw Error(`The verification key hash is not consistent with the provided data`);
254253

0 commit comments

Comments
 (0)