File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -872,13 +872,8 @@ impl<FEN: FoundryEvmNetwork> Cheatcodes<FEN> {
872872 && mock. value . is_none_or ( |value| Some ( value) == call. transfer_value ( ) )
873873 } )
874874 . map ( |( _, v) | v) ,
875- } && let Some ( return_data) = if return_data_queue. len ( ) == 1 {
876- // If the mocked calls stack has a single element in it, don't empty it
877- return_data_queue. front ( ) . map ( |x| x. to_owned ( ) )
878- } else {
879- // Else, we pop the front element
880- return_data_queue. pop_front ( )
881- } {
875+ } && let Some ( return_data) = return_data_queue. front ( ) . map ( |x| x. to_owned ( ) )
876+ {
882877 if let Some ( value) = call. transfer_value ( ) {
883878 let checkpoint = ecx. journal_mut ( ) . checkpoint ( ) ;
884879 match ecx. journal_mut ( ) . transfer_loaded (
@@ -909,6 +904,11 @@ impl<FEN: FoundryEvmNetwork> Cheatcodes<FEN> {
909904 }
910905 }
911906
907+ // If the mocked calls stack has a single element in it, don't empty it
908+ if return_data_queue. len ( ) > 1 {
909+ return_data_queue. pop_front ( ) ;
910+ }
911+
912912 return Some ( CallOutcome {
913913 result : InterpreterResult {
914914 result : return_data. ret_type ,
You can’t perform that action at this time.
0 commit comments