Skip to content

Commit 5f0c8eb

Browse files
committed
refactor: non-null assertion operator
1 parent eb30f37 commit 5f0c8eb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

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

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

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

0 commit comments

Comments
 (0)