@@ -16,7 +16,7 @@ use crate::routes::transactions::models::{
1616 Custom , Erc721Transfer , TransactionInfo , TransactionStatus , Transfer , TransferDirection ,
1717 TransferInfo ,
1818} ;
19- use crate :: utils:: errors:: ApiError ;
19+ use crate :: utils:: errors:: { ApiError , ErrorDetails } ;
2020use crate :: utils:: http_client:: Response ;
2121
2222#[ rocket:: async_test]
@@ -74,14 +74,14 @@ async fn multisig_custom_transaction_to_transaction_details() {
7474 param_type: "uint256" . to_string( ) ,
7575 value: SingleValue ( String :: from( "500000000000000" ) ) ,
7676 value_decoded: None ,
77- }
77+ } ,
7878 ] ) ,
7979 } ) ,
8080 to : AddressEx :: address_only ( "0xD9BA894E0097f8cC2BBc9D24D308b98e36dc6D02" ) ,
8181 value : Some ( String :: from ( "0" ) ) ,
8282 operation : Operation :: CALL ,
8383 address_info_index : None ,
84- trusted_delegate_call_target : None
84+ trusted_delegate_call_target : None ,
8585 } ) ,
8686 detailed_execution_info : Some ( DetailedExecutionInfo :: Multisig (
8787 MultisigExecutionDetails {
@@ -99,7 +99,7 @@ async fn multisig_custom_transaction_to_transaction_details() {
9999 AddressEx :: address_only( "0x37e9F140A9Df5DCBc783C6c220660a4E15CBFe72" ) ,
100100 AddressEx :: address_only( "0xA3DAa0d9Ae02dAA17a664c232aDa1B739eF5ae8D" ) ,
101101 AddressEx :: address_only( "0xF2CeA96575d6b10f51d9aF3b10e3e4E5738aa6bd" ) ,
102- AddressEx :: address_only( "0x65F8236309e5A99Ff0d129d04E486EBCE20DC7B0" )
102+ AddressEx :: address_only( "0x65F8236309e5A99Ff0d129d04E486EBCE20DC7B0" ) ,
103103 ] ,
104104 confirmations_required : 2 ,
105105 confirmations : vec ! [
@@ -171,7 +171,7 @@ async fn module_transaction_to_transaction_details_module_info_success() {
171171 value : Some ( String :: from ( "0" ) ) ,
172172 operation : Operation :: CALL ,
173173 address_info_index : None ,
174- trusted_delegate_call_target : None
174+ trusted_delegate_call_target : None ,
175175 } ) ,
176176 detailed_execution_info : Some ( DetailedExecutionInfo :: Module (
177177 ModuleExecutionDetails {
@@ -229,7 +229,7 @@ async fn module_transaction_to_transaction_details_success() {
229229 value : Some ( String :: from ( "0" ) ) ,
230230 operation : Operation :: CALL ,
231231 address_info_index : None ,
232- trusted_delegate_call_target : None
232+ trusted_delegate_call_target : None ,
233233 } ) ,
234234 detailed_execution_info : Some ( DetailedExecutionInfo :: Module (
235235 ModuleExecutionDetails {
@@ -283,7 +283,7 @@ async fn module_transaction_to_transaction_details_failed() {
283283 value : Some ( String :: from ( "0" ) ) ,
284284 operation : Operation :: CALL ,
285285 address_info_index : None ,
286- trusted_delegate_call_target : None
286+ trusted_delegate_call_target : None ,
287287 } ) ,
288288 detailed_execution_info : Some ( DetailedExecutionInfo :: Module (
289289 ModuleExecutionDetails {
@@ -423,7 +423,8 @@ async fn is_trusted_delegate_with_call() {
423423 & Some ( data_decoded) ,
424424 & mock_info_provider,
425425 )
426- . await ;
426+ . await
427+ . unwrap ( ) ;
427428
428429 assert_eq ! ( actual, None ) ;
429430}
@@ -454,7 +455,8 @@ async fn is_trusted_delegate_with_delegate() {
454455 & Some ( data_decoded) ,
455456 & mock_info_provider,
456457 )
457- . await ;
458+ . await
459+ . unwrap ( ) ;
458460
459461 assert_eq ! ( actual, Some ( false ) ) ;
460462}
@@ -483,7 +485,18 @@ async fn is_trusted_delegate_with_contract_request_failure() {
483485 )
484486 . await ;
485487
486- assert_eq ! ( actual, None ) ;
488+ assert_eq ! (
489+ actual. unwrap_err( ) ,
490+ ApiError {
491+ status: 404 ,
492+ details: ErrorDetails {
493+ code: 1337 ,
494+ message: Some ( "" . to_string( ) ) ,
495+ debug: None ,
496+ arguments: None
497+ }
498+ }
499+ ) ;
487500}
488501
489502#[ rocket:: async_test]
@@ -514,7 +527,8 @@ async fn is_trusted_delegate_with_call_but_nested_delegate() {
514527 & Some ( data_decoded) ,
515528 & mock_info_provider,
516529 )
517- . await ;
530+ . await
531+ . unwrap ( ) ;
518532
519533 assert_eq ! ( actual, Some ( false ) ) ;
520534}
0 commit comments