From 371d184f05af3f4f6485ac21b769b20913394eff Mon Sep 17 00:00:00 2001 From: Elias Tazartes <66871571+Eikix@users.noreply.github.com> Date: Fri, 26 Apr 2024 14:27:36 +0200 Subject: [PATCH] fix protocol nonce not found (#1024) --- src/eth_provider/provider.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/eth_provider/provider.rs b/src/eth_provider/provider.rs index 23a4d86f8..2f13976c0 100644 --- a/src/eth_provider/provider.rs +++ b/src/eth_provider/provider.rs @@ -358,8 +358,7 @@ where // Get the protocol nonce as well, in edge cases where the protocol nonce is higher than the account nonce. // This can happen when an underlying Starknet transaction reverts => Account storage changes are reverted, // but the protocol nonce is still incremented. - let protocol_nonce = - self.starknet_provider.get_nonce(starknet_block_id, address).await.map_err(KakarotError::from)?; + let protocol_nonce = self.starknet_provider.get_nonce(starknet_block_id, address).await.unwrap_or_default(); let nonce = nonce.max(protocol_nonce); Ok(into_via_wrapper!(nonce))