@@ -210,7 +210,7 @@ pub fn query_verify_ethereum_text(
210210 // Decompose signature
211211 let ( v, rs) = match signature. split_last ( ) {
212212 Some ( pair) => pair,
213- None => return Err ( StdError :: generic_err ( "Signature must not be empty" ) ) ,
213+ None => return Err ( StdError :: msg ( "Signature must not be empty" ) ) ,
214214 } ;
215215 let recovery = get_recovery_param ( * v) ?;
216216
@@ -326,7 +326,7 @@ mod tests {
326326 use cosmwasm_std:: testing:: {
327327 message_info, mock_dependencies, mock_env, MockApi , MockQuerier , MockStorage ,
328328 } ;
329- use cosmwasm_std:: { from_json, OwnedDeps , RecoverPubkeyError , VerificationError } ;
329+ use cosmwasm_std:: { from_json, OwnedDeps , StdErrorKind } ;
330330 use hex_literal:: hex;
331331
332332 const CREATOR : & str = "creator" ;
@@ -426,11 +426,8 @@ mod tests {
426426 let res = query ( deps. as_ref ( ) , mock_env ( ) , verify_msg) ;
427427 assert ! ( res. is_err( ) ) ;
428428 assert ! ( matches!(
429- res. unwrap_err( ) ,
430- StdError :: VerificationErr {
431- source: VerificationError :: InvalidPubkeyFormat ,
432- ..
433- }
429+ res. unwrap_err( ) . kind( ) ,
430+ StdErrorKind :: Cryptography ,
434431 ) )
435432 }
436433
@@ -500,11 +497,8 @@ mod tests {
500497 signer_address : signer_address. into ( ) ,
501498 } ;
502499 let result = query ( deps. as_ref ( ) , mock_env ( ) , verify_msg) ;
503- match result. unwrap_err ( ) {
504- StdError :: RecoverPubkeyErr {
505- source : RecoverPubkeyError :: UnknownErr { .. } ,
506- ..
507- } => { }
500+ match result. unwrap_err ( ) . kind ( ) {
501+ StdErrorKind :: Cryptography => { }
508502 err => panic ! ( "Unexpected error: {err:?}" ) ,
509503 }
510504 }
@@ -715,11 +709,8 @@ mod tests {
715709 let res = query ( deps. as_ref ( ) , mock_env ( ) , verify_msg) ;
716710 assert ! ( res. is_err( ) ) ;
717711 assert ! ( matches!(
718- res. unwrap_err( ) ,
719- StdError :: VerificationErr {
720- source: VerificationError :: InvalidPubkeyFormat ,
721- ..
722- }
712+ res. unwrap_err( ) . kind( ) ,
713+ StdErrorKind :: Cryptography
723714 ) )
724715 }
725716
@@ -781,11 +772,8 @@ mod tests {
781772 let res = query ( deps. as_ref ( ) , mock_env ( ) , verify_msg) ;
782773 assert ! ( res. is_err( ) ) ;
783774 assert ! ( matches!(
784- res. unwrap_err( ) ,
785- StdError :: VerificationErr {
786- source: VerificationError :: InvalidPubkeyFormat ,
787- ..
788- }
775+ res. unwrap_err( ) . kind( ) ,
776+ StdErrorKind :: Cryptography ,
789777 ) )
790778 }
791779
0 commit comments