File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ fn main() -> Result<(), Box<dyn StdErr>> {
266266 Commands :: SignOpenTx ( args) => {
267267 let tx_info: TxInfo = serde_json:: from_slice ( & fs:: read ( & args. tx_file ) ?) ?;
268268 let tx = Transaction :: from ( tx_info. tx . inner ) . into_view ( ) ;
269- let keys = args
269+ let keys: Vec < secp256k1 :: SecretKey > = args
270270 . sender_key
271271 . iter ( )
272272 . map ( |sender_key| {
@@ -276,7 +276,7 @@ fn main() -> Result<(), Box<dyn StdErr>> {
276276 } )
277277 . collect ( ) ;
278278 if tx_info. omnilock_config . is_pubkey_hash ( ) || tx_info. omnilock_config . is_ethereum ( ) {
279- for key in & keys {
279+ for ( i , key) in keys. iter ( ) . enumerate ( ) {
280280 let pubkey = secp256k1:: PublicKey :: from_secret_key ( & SECP256K1 , key) ;
281281 let hash160 = match tx_info. omnilock_config . id ( ) . flag ( ) {
282282 IdentityFlag :: PubkeyHash => {
@@ -288,7 +288,11 @@ fn main() -> Result<(), Box<dyn StdErr>> {
288288 _ => unreachable ! ( ) ,
289289 } ;
290290 if tx_info. omnilock_config . id ( ) . auth_content ( ) . as_bytes ( ) != hash160 {
291- return Err ( format ! ( "key {:#x} is not in omnilock config" , key) . into ( ) ) ;
291+ return Err ( format ! (
292+ "key {:#x} is not in omnilock config" ,
293+ args. sender_key[ i]
294+ )
295+ . into ( ) ) ;
292296 }
293297 }
294298 }
You can’t perform that action at this time.
0 commit comments