@@ -125,10 +125,7 @@ impl<'c> MintClient<'c> {
125
125
126
126
// We check for coin validity in case we got it from an untrusted third party. We
127
127
// 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) ;
132
129
if & spend_pub_key == coin. coin . spend_key ( ) {
133
130
Ok ( ( spend_key, ( amt, coin. coin ) ) )
134
131
} else {
@@ -334,13 +331,13 @@ impl CoinRequest {
334
331
{
335
332
let spend_key = secp256k1_zkp:: schnorrsig:: KeyPair :: new ( ctx, & mut rng) ;
336
333
let nonce = CoinNonce ( secp256k1_zkp:: schnorrsig:: PublicKey :: from_keypair (
337
- ctx , & spend_key,
334
+ & spend_key,
338
335
) ) ;
339
336
340
337
let ( blinding_key, blinded_nonce) = blind_message ( nonce. to_message ( ) ) ;
341
338
342
339
let cr = CoinRequest {
343
- spend_key : spend_key. serialize_secret ( ) ,
340
+ spend_key : spend_key. serialize_bytes ( ) ,
344
341
nonce,
345
342
blinding_key,
346
343
} ;
@@ -583,7 +580,7 @@ mod tests {
583
580
meta. keys,
584
581
spend_keys
585
582
. into_iter( )
586
- . map( |key| secp256k1_zkp:: schnorrsig:: PublicKey :: from_keypair( & ctx , & key) )
583
+ . map( |key| secp256k1_zkp:: schnorrsig:: PublicKey :: from_keypair( & key) )
587
584
. collect:: <Vec <_>>( )
588
585
) ;
589
586
@@ -611,7 +608,7 @@ mod tests {
611
608
meta. keys,
612
609
spend_keys
613
610
. into_iter( )
614
- . map( |key| secp256k1_zkp:: schnorrsig:: PublicKey :: from_keypair( & ctx , & key) )
611
+ . map( |key| secp256k1_zkp:: schnorrsig:: PublicKey :: from_keypair( & key) )
615
612
. collect:: <Vec <_>>( )
616
613
) ;
617
614
0 commit comments