From 15d783de328d0f4dbbae84c536a065264133c539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wiktor=20Tkaczy=C5=84ski?= Date: Tue, 15 Aug 2023 16:51:20 +0200 Subject: [PATCH] fix: throw if commit is not found (#482) --- starknet/src/authenticators/eth_tx.cairo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starknet/src/authenticators/eth_tx.cairo b/starknet/src/authenticators/eth_tx.cairo index b651383a..53b4a2ea 100644 --- a/starknet/src/authenticators/eth_tx.cairo +++ b/starknet/src/authenticators/eth_tx.cairo @@ -163,7 +163,7 @@ mod EthTxAuthenticator { fn consume_commit(ref self: ContractState, hash: felt252, sender_address: EthAddress) { let committer_address = self._commits.read(hash); - assert(committer_address.is_zero(), 'Commit not found'); + assert(!committer_address.is_zero(), 'Commit not found'); assert(committer_address == sender_address, 'Invalid sender address'); // Delete the commit to prevent replay attacks. self._commits.write(hash, Zeroable::zero());