avoid multiple logging for accounts

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch 2024-12-05 13:41:05 +03:00
parent 4d32d4d403
commit fc50b78637
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
2 changed files with 7 additions and 8 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "ghost-eye" name = "ghost-eye"
version = "0.2.0" version = "0.2.1"
edition = "2021" edition = "2021"
[dependencies] [dependencies]

View File

@ -178,14 +178,13 @@ impl Accounts {
let pair_signer = PairSigner::<CasperConfig, Pair>::new(pair); 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));
}
if let Some(action_tx) = &self.action_tx { if let Some(action_tx) = &self.action_tx {
let _ = action_tx.send(Action::WalletLog( let _ = action_tx.send(Action::WalletLog(
format!("read {} wallets from disk", self.wallet_keys.len()), format!("read {} wallets from disk", self.wallet_keys.len()),
ActionLevel::Info, ActionLevel::Info,
)); ));
} }
}
}, },
Err(_) => { Err(_) => {
let (pair, seed) = match std::fs::read_to_string("/etc/ghost/wallet-key") { let (pair, seed) = match std::fs::read_to_string("/etc/ghost/wallet-key") {