Convert Public to CryptoTypePublicPair (#6014)

* Tabify code

* Implement CryptoTypePublicPair in app_crypto

* Cleanup redundancy

* Introduce to_public_crypto_pair to Public trait

* Implement method for test
This commit is contained in:
Rakan Alhneiti
2020-05-13 19:44:54 +02:00
committed by GitHub
parent daf8cf0600
commit 6bdfae2bcb
8 changed files with 52 additions and 50 deletions
+4
View File
@@ -391,6 +391,10 @@ impl TraitPublic for Public {
r.copy_from_slice(data);
Public(r)
}
fn to_public_crypto_pair(&self) -> CryptoTypePublicPair {
CryptoTypePublicPair(CRYPTO_ID, self.to_raw_vec())
}
}
impl From<Public> for CryptoTypePublicPair {