File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,10 @@ pub enum WalletSignerError {
32
32
Trezor ( #[ from] TrezorError ) ,
33
33
#[ error( transparent) ]
34
34
#[ cfg( feature = "aws-kms" ) ]
35
- Aws ( #[ from] AwsSignerError ) ,
35
+ Aws ( #[ from] Box < AwsSignerError > ) ,
36
36
#[ error( transparent) ]
37
37
#[ cfg( feature = "gcp-kms" ) ]
38
- Gcp ( #[ from] GcpSignerError ) ,
38
+ Gcp ( #[ from] Box < GcpSignerError > ) ,
39
39
#[ error( transparent) ]
40
40
Io ( #[ from] std:: io:: Error ) ,
41
41
#[ error( transparent) ]
Original file line number Diff line number Diff line change @@ -60,7 +60,11 @@ impl WalletSigner {
60
60
alloy_signer_aws:: aws_config:: load_defaults ( BehaviorVersion :: latest ( ) ) . await ;
61
61
let client = AwsClient :: new ( & config) ;
62
62
63
- Ok ( Self :: Aws ( AwsSigner :: new ( client, key_id, None ) . await ?) )
63
+ Ok ( Self :: Aws (
64
+ AwsSigner :: new ( client, key_id, None )
65
+ . await
66
+ . map_err ( |e| WalletSignerError :: Aws ( Box :: new ( e) ) ) ?,
67
+ ) )
64
68
}
65
69
66
70
#[ cfg( not( feature = "aws-kms" ) ) ]
@@ -88,12 +92,20 @@ impl WalletSigner {
88
92
. await
89
93
{
90
94
Ok ( c) => c,
91
- Err ( e) => return Err ( WalletSignerError :: from ( GcpSignerError :: GoogleKmsError ( e) ) ) ,
95
+ Err ( e) => {
96
+ return Err ( WalletSignerError :: Gcp ( Box :: new ( GcpSignerError :: GoogleKmsError (
97
+ e,
98
+ ) ) ) ) ;
99
+ }
92
100
} ;
93
101
94
102
let specifier = KeySpecifier :: new ( keyring, & key_name, key_version) ;
95
103
96
- Ok ( Self :: Gcp ( GcpSigner :: new ( client, specifier, None ) . await ?) )
104
+ Ok ( Self :: Gcp (
105
+ GcpSigner :: new ( client, specifier, None )
106
+ . await
107
+ . map_err ( |e| WalletSignerError :: Gcp ( Box :: new ( e) ) ) ?,
108
+ ) )
97
109
}
98
110
99
111
#[ cfg( not( feature = "gcp-kms" ) ) ]
You can’t perform that action at this time.
0 commit comments