Skip to content

Commit

Permalink
fix protocol nonce not found (#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eikix authored Apr 26, 2024
1 parent 76bdd73 commit 371d184
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/eth_provider/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 371d184

Please sign in to comment.