mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-23 01:58:32 +02:00
Update deps (#768)
* build: update grin submodule to last staging * build: update grin submodule * build: remove remove_dir_all dependency * build: update rpassword * build: update semver * build: remove unused deps * build: update ring * build: update lock file deps * build: update rustyline * build: update ed25519-dalek * build: update curve25519-dalek * build: update age * build: update uuid * fix: uuid test * build: update x25519-dalek * fix: x25519-dalek build * build: update arti * build: update grin submodule * build: update hyper * fix: initialize rustls provider for tests * build: update grin submodule * fix: rustls install provider * tor: share getting private key * fix: show an error on node version parse * cli: renamed prompt password method * fix: replace into_boxed_slice with try_from * fix: dalek tests for onion * config: comment expanded secret key * fix: import api body for controller * password: handle prompt error * wallet: parse node error message * tests: do not use random values for sign messages * build: make hook executable * build: cargo format all * rustls: do not install provider at tests and globally * build: update grin submodule * build: fix api channel from grin submodule * args: use read_password for piped prompt * build: remove unused dep * test: fixed signature * preserve piped pw input --------- Co-authored-by: wiesche <wiesche89@googlemail.com>
This commit is contained in:
@@ -25,7 +25,7 @@ use crate::grin_keychain::ViewKey;
|
||||
use crate::grin_util::secp::{key::SecretKey, pedersen::Commitment};
|
||||
use crate::grin_util::Mutex;
|
||||
use crate::grin_util::ToHex;
|
||||
use crate::util::{OnionV3Address, OnionV3AddressError};
|
||||
use crate::util::OnionV3Address;
|
||||
|
||||
use crate::api_impl::owner_updater::StatusMessage;
|
||||
use crate::grin_keychain::{BlindingFactor, Identifier, Keychain, SwitchCommitmentType};
|
||||
@@ -41,9 +41,9 @@ use crate::{
|
||||
WalletInitStatus, WalletInst, WalletLCProvider,
|
||||
};
|
||||
|
||||
use ed25519_dalek::PublicKey as DalekPublicKey;
|
||||
use ed25519_dalek::SecretKey as DalekSecretKey;
|
||||
use ed25519_dalek::SigningKey as DalekSecretKey;
|
||||
use ed25519_dalek::Verifier;
|
||||
use ed25519_dalek::VerifyingKey as DalekPublicKey;
|
||||
use x25519_dalek::{PublicKey as xPublicKey, StaticSecret};
|
||||
|
||||
use std::convert::{TryFrom, TryInto};
|
||||
@@ -133,16 +133,7 @@ where
|
||||
let parent_key_id = w.parent_key_id();
|
||||
let k = w.keychain(keychain_mask)?;
|
||||
let sec_addr_key = address::address_from_derivation_path(&k, &parent_key_id, index)?;
|
||||
let d_skey = match DalekSecretKey::from_bytes(&sec_addr_key.0) {
|
||||
Ok(k) => k,
|
||||
Err(e) => {
|
||||
return Err(OnionV3AddressError::InvalidPrivateKey(format!(
|
||||
"Unable to create secret key: {}",
|
||||
e
|
||||
))
|
||||
.into());
|
||||
}
|
||||
};
|
||||
let d_skey = DalekSecretKey::from_bytes(&sec_addr_key.0);
|
||||
Ok(d_skey)
|
||||
}
|
||||
|
||||
@@ -1238,12 +1229,7 @@ where
|
||||
|
||||
// for now, simple test whether one of the addresses belongs to this wallet
|
||||
let sec_key = address::address_from_derivation_path(&keychain, &parent_key_id, 0)?;
|
||||
let d_skey = match DalekSecretKey::from_bytes(&sec_key.0) {
|
||||
Ok(k) => k,
|
||||
Err(e) => {
|
||||
return Err(Error::ED25519Key(format!("{}", e)));
|
||||
}
|
||||
};
|
||||
let d_skey = DalekSecretKey::from_bytes(&sec_key.0);
|
||||
let my_address_pubkey: DalekPublicKey = (&d_skey).into();
|
||||
|
||||
let sender_mine = my_address_pubkey == sender_pubkey;
|
||||
|
||||
Reference in New Issue
Block a user