From 4d838f0d390d6ca8c9642210ea1db12f98770508 Mon Sep 17 00:00:00 2001 From: Quantum Explorer Date: Sun, 6 Oct 2024 14:39:10 +0700 Subject: [PATCH] fix features --- .../src/identity/identity_public_key/key_type.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/rs-dpp/src/identity/identity_public_key/key_type.rs b/packages/rs-dpp/src/identity/identity_public_key/key_type.rs index 382ef7a021..908f913969 100644 --- a/packages/rs-dpp/src/identity/identity_public_key/key_type.rs +++ b/packages/rs-dpp/src/identity/identity_public_key/key_type.rs @@ -210,9 +210,8 @@ impl KeyType { match self { KeyType::ECDSA_SECP256K1 => { let secp = Secp256k1::new(); - let secret_key = - dashcore::secp256k1::SecretKey::from_slice(private_key_bytes) - .map_err(|e| ProtocolError::Generic(e.to_string()))?; + let secret_key = dashcore::secp256k1::SecretKey::from_slice(private_key_bytes) + .map_err(|e| ProtocolError::Generic(e.to_string()))?; let private_key = dashcore::PrivateKey::new(secret_key, network); Ok(private_key.public_key(&secp).to_bytes()) @@ -237,9 +236,8 @@ impl KeyType { } KeyType::ECDSA_HASH160 => { let secp = Secp256k1::new(); - let secret_key = - dashcore::secp256k1::SecretKey::from_slice(private_key_bytes) - .map_err(|e| ProtocolError::Generic(e.to_string()))?; + let secret_key = dashcore::secp256k1::SecretKey::from_slice(private_key_bytes) + .map_err(|e| ProtocolError::Generic(e.to_string()))?; let private_key = dashcore::PrivateKey::new(secret_key, network); Ok(ripemd160_sha256(private_key.public_key(&secp).to_bytes().as_slice()).to_vec())