newly generated keys representation fix, thanks to @sargio, @ASB_clown and @metanomad
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
parent
3b7aaa7fd2
commit
3662f9c666
@ -173,11 +173,11 @@ impl StashInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn generate_and_save_new_key(&mut self) -> Result<()> {
|
fn generate_and_save_new_key(&mut self) -> Result<()> {
|
||||||
let (pair, seed) = Pair::generate(); // TODO: revisit
|
let (pair, seed) = Pair::generate();
|
||||||
let secret_seed = hex::encode(seed);
|
let secret_seed = hex::encode(seed);
|
||||||
let address = AccountId32::from(pair.public().0)
|
|
||||||
.to_ss58check_with_version(Ss58AddressFormat::custom(1996));
|
|
||||||
let account_id = pair.public().0;
|
let account_id = pair.public().0;
|
||||||
|
let address = AccountId32::from(account_id)
|
||||||
|
.to_ss58check_with_version(Ss58AddressFormat::custom(1996));
|
||||||
let pair_signer = PairSigner::<CasperConfig, Pair>::new(pair);
|
let pair_signer = PairSigner::<CasperConfig, Pair>::new(pair);
|
||||||
|
|
||||||
let mut new_file = File::create(&self.file_path)?;
|
let mut new_file = File::create(&self.file_path)?;
|
||||||
|
@ -136,10 +136,10 @@ impl Accounts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn create_new_account(&mut self, name: String) {
|
fn create_new_account(&mut self, name: String) {
|
||||||
let (pair, seed) = Pair::generate(); // TODO: generate_with_phrase()
|
let (pair, seed) = Pair::generate();
|
||||||
let secret_seed = hex::encode(seed);
|
let secret_seed = hex::encode(seed);
|
||||||
let account_id = pair.public().0;
|
let account_id = pair.public().0;
|
||||||
let address = AccountId32::from(seed)
|
let address = AccountId32::from(account_id)
|
||||||
.to_ss58check_with_version(Ss58AddressFormat::custom(1996));
|
.to_ss58check_with_version(Ss58AddressFormat::custom(1996));
|
||||||
|
|
||||||
self.log_event(
|
self.log_event(
|
||||||
@ -278,7 +278,7 @@ impl Accounts {
|
|||||||
|
|
||||||
let secret_seed = hex::encode(seed);
|
let secret_seed = hex::encode(seed);
|
||||||
let account_id = pair.public().0;
|
let account_id = pair.public().0;
|
||||||
let address = AccountId32::from(pair.public().0)
|
let address = AccountId32::from(account_id)
|
||||||
.to_ss58check_with_version(Ss58AddressFormat::custom(1996));
|
.to_ss58check_with_version(Ss58AddressFormat::custom(1996));
|
||||||
|
|
||||||
let mut new_file = File::create(file_path)?;
|
let mut new_file = File::create(file_path)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user