@@ -125,10 +125,7 @@ impl<'c> MintClient<'c> {
125125
126126 // We check for coin validity in case we got it from an untrusted third party. We
127127 // don't want to needlessly create invalid tx and bother the federation with them.
128- let spend_pub_key = secp256k1_zkp:: schnorrsig:: PublicKey :: from_keypair (
129- self . context . secp ,
130- & spend_key,
131- ) ;
128+ let spend_pub_key = secp256k1_zkp:: schnorrsig:: PublicKey :: from_keypair ( & spend_key) ;
132129 if & spend_pub_key == coin. coin . spend_key ( ) {
133130 Ok ( ( spend_key, ( amt, coin. coin ) ) )
134131 } else {
@@ -334,13 +331,13 @@ impl CoinRequest {
334331 {
335332 let spend_key = secp256k1_zkp:: schnorrsig:: KeyPair :: new ( ctx, & mut rng) ;
336333 let nonce = CoinNonce ( secp256k1_zkp:: schnorrsig:: PublicKey :: from_keypair (
337- ctx , & spend_key,
334+ & spend_key,
338335 ) ) ;
339336
340337 let ( blinding_key, blinded_nonce) = blind_message ( nonce. to_message ( ) ) ;
341338
342339 let cr = CoinRequest {
343- spend_key : spend_key. serialize_secret ( ) ,
340+ spend_key : spend_key. serialize_bytes ( ) ,
344341 nonce,
345342 blinding_key,
346343 } ;
@@ -583,7 +580,7 @@ mod tests {
583580 meta. keys,
584581 spend_keys
585582 . into_iter( )
586- . map( |key| secp256k1_zkp:: schnorrsig:: PublicKey :: from_keypair( & ctx , & key) )
583+ . map( |key| secp256k1_zkp:: schnorrsig:: PublicKey :: from_keypair( & key) )
587584 . collect:: <Vec <_>>( )
588585 ) ;
589586
@@ -611,7 +608,7 @@ mod tests {
611608 meta. keys,
612609 spend_keys
613610 . into_iter( )
614- . map( |key| secp256k1_zkp:: schnorrsig:: PublicKey :: from_keypair( & ctx , & key) )
611+ . map( |key| secp256k1_zkp:: schnorrsig:: PublicKey :: from_keypair( & key) )
615612 . collect:: <Vec <_>>( )
616613 ) ;
617614
0 commit comments