wallet public addres fix, thanks to DoctorK for pointing out the issue
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
parent
b5ad10ad6d
commit
7e776ca7e9
@ -147,9 +147,9 @@ impl Accounts {
|
|||||||
.expect("stored seed is valid length; qed");
|
.expect("stored seed is valid length; qed");
|
||||||
|
|
||||||
let pair = Pair::from_seed(&seed);
|
let pair = Pair::from_seed(&seed);
|
||||||
let pair_signer = PairSigner::<CasperConfig, Pair>::new(pair);
|
let address = AccountId32::from(pair.public().0)
|
||||||
let address = AccountId32::from(seed.clone())
|
|
||||||
.to_ss58check_with_version(Ss58AddressFormat::custom(1996));
|
.to_ss58check_with_version(Ss58AddressFormat::custom(1996));
|
||||||
|
let pair_signer = PairSigner::<CasperConfig, Pair>::new(pair);
|
||||||
|
|
||||||
self.wallet_keys.push((wallet_name.to_string(), address, wallet_key.to_string(), pair_signer));
|
self.wallet_keys.push((wallet_name.to_string(), address, wallet_key.to_string(), pair_signer));
|
||||||
}
|
}
|
||||||
@ -175,14 +175,13 @@ impl Accounts {
|
|||||||
};
|
};
|
||||||
|
|
||||||
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 pair_signer = PairSigner::<CasperConfig, Pair>::new(pair);
|
let pair_signer = PairSigner::<CasperConfig, Pair>::new(pair);
|
||||||
|
|
||||||
let mut new_file = File::create(file_path)?;
|
let mut new_file = File::create(file_path)?;
|
||||||
writeln!(new_file, "ghostie:0x{}", &secret_seed)?;
|
writeln!(new_file, "ghostie:0x{}", &secret_seed)?;
|
||||||
|
|
||||||
let address = AccountId32::from(seed.clone())
|
|
||||||
.to_ss58check_with_version(Ss58AddressFormat::custom(1996));
|
|
||||||
|
|
||||||
self.wallet_keys.push(("ghostie".to_string(), address, secret_seed, pair_signer));
|
self.wallet_keys.push(("ghostie".to_string(), address, secret_seed, pair_signer));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -317,8 +316,8 @@ impl Component for Accounts {
|
|||||||
Cell::from(Text::from("31 CSPR".to_string()).alignment(Alignment::Right)),
|
Cell::from(Text::from("31 CSPR".to_string()).alignment(Alignment::Right)),
|
||||||
])),
|
])),
|
||||||
[
|
[
|
||||||
Constraint::Min(0),
|
Constraint::Min(5),
|
||||||
Constraint::Min(15),
|
Constraint::Max(51),
|
||||||
Constraint::Min(10),
|
Constraint::Min(10),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@ -250,8 +250,8 @@ impl Component for AddressBook {
|
|||||||
Cell::from(Text::from("31 CSPR".to_string()).alignment(Alignment::Right)),
|
Cell::from(Text::from("31 CSPR".to_string()).alignment(Alignment::Right)),
|
||||||
])),
|
])),
|
||||||
[
|
[
|
||||||
Constraint::Min(0),
|
Constraint::Min(5),
|
||||||
Constraint::Min(13),
|
Constraint::Max(51),
|
||||||
Constraint::Min(10),
|
Constraint::Min(10),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user