File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -288,21 +288,11 @@ impl TryFrom<RawConfigFile> for GlobalConfig {
288
288
ConfigError :: BadField ( "endpoint" . to_string ( ) , raw_data. endpoint . clone ( ) )
289
289
} ) ?;
290
290
291
- let stacks_private_key =
292
- StacksPrivateKey :: from_hex ( & raw_data. stacks_private_key ) . map_err ( |_| {
293
- ConfigError :: BadField (
294
- "stacks_private_key" . to_string ( ) ,
295
- raw_data. stacks_private_key . clone ( ) ,
296
- )
297
- } ) ?;
291
+ let stacks_private_key = StacksPrivateKey :: from_hex ( & raw_data. stacks_private_key )
292
+ . map_err ( |e| ConfigError :: BadField ( "stacks_private_key" . to_string ( ) , e. into ( ) ) ) ?;
298
293
299
- let ecdsa_private_key =
300
- Scalar :: try_from ( & stacks_private_key. to_bytes ( ) [ ..32 ] ) . map_err ( |_| {
301
- ConfigError :: BadField (
302
- "stacks_private_key" . to_string ( ) ,
303
- raw_data. stacks_private_key . clone ( ) ,
304
- )
305
- } ) ?;
294
+ let ecdsa_private_key = Scalar :: try_from ( & stacks_private_key. to_bytes ( ) [ ..32 ] )
295
+ . map_err ( |e| ConfigError :: BadField ( "stacks_private_key" . to_string ( ) , e. to_string ( ) ) ) ?;
306
296
let stacks_public_key = StacksPublicKey :: from_private ( & stacks_private_key) ;
307
297
let signer_hash = Hash160 :: from_data ( stacks_public_key. to_bytes_compressed ( ) . as_slice ( ) ) ;
308
298
let stacks_address =
You can’t perform that action at this time.
0 commit comments