mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 09:47:56 +00:00
Prune some duplicate dependencies (#4219)
* Prune some duplicate dependencies * Remove ed25519-dalek 0.9.1 * Remove hex 0.3.2 * Remove parity-wasm 0.40.3 * Remove pwasm-utils 0.11.0 * Remove wasmi-validation 0.2.0 * Remove quickcheck 0.8.5 * Remove tempdir (Replace tempdir with tempfile) Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Remove useless tempdir_with_prefix Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Remove derive_more 0.15 Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
committed by
Bastian Köcher
parent
a782021ee8
commit
4a21f9bbfd
@@ -445,7 +445,7 @@ impl TraitPair for Pair {
|
||||
fn from_seed_slice(seed_slice: &[u8]) -> Result<Pair, SecretStringError> {
|
||||
let secret = ed25519_dalek::SecretKey::from_bytes(seed_slice)
|
||||
.map_err(|_| SecretStringError::InvalidSeedLength)?;
|
||||
let public = ed25519_dalek::PublicKey::from(secret.expand::<sha2::Sha512>());
|
||||
let public = ed25519_dalek::PublicKey::from(&secret);
|
||||
Ok(Pair(ed25519_dalek::Keypair { secret, public }))
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ impl TraitPair for Pair {
|
||||
|
||||
/// Sign a message.
|
||||
fn sign(&self, message: &[u8]) -> Signature {
|
||||
let r = self.0.sign::<sha2::Sha512>(message).to_bytes();
|
||||
let r = self.0.sign(message).to_bytes();
|
||||
Signature::from_raw(r)
|
||||
}
|
||||
|
||||
@@ -498,7 +498,7 @@ impl TraitPair for Pair {
|
||||
Err(_) => return false
|
||||
};
|
||||
|
||||
match public_key.verify::<sha2::Sha512>(message.as_ref(), &sig) {
|
||||
match public_key.verify(message.as_ref(), &sig) {
|
||||
Ok(_) => true,
|
||||
_ => false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user