Przeglądaj źródła

sdk: Remove leftover Address impl

parazyd 3 lat temu
rodzic
commit
51e753ce4b
1 zmienionych plików z 1 dodań i 11 usunięć
  1. 1 11
      src/sdk/src/crypto/keypair.rs

+ 1 - 11
src/sdk/src/crypto/keypair.rs

@@ -30,7 +30,7 @@ use pasta_curves::{
 };
 use rand_core::{CryptoRng, RngCore};
 
-use super::{constants::NullifierK, util::mod_r_p, Address};
+use super::{constants::NullifierK, util::mod_r_p};
 use crate::error::ContractError;
 
 /// Keypair structure holding a `SecretKey` and its respective `PublicKey`
@@ -181,13 +181,3 @@ impl core::fmt::Display for PublicKey {
         write!(f, "{}", disp)
     }
 }
-
-impl TryFrom<Address> for PublicKey {
-    type Error = ContractError;
-
-    fn try_from(address: Address) -> Result<Self, Self::Error> {
-        let mut bytes = [0u8; 32];
-        bytes.copy_from_slice(&address.inner()[1..33]);
-        Self::from_bytes(bytes)
-    }
-}