mirror of
https://github.com/Qortal/piratewallet-light-cli.git
synced 2025-02-11 17:55:47 +00:00
Cleanup
This commit is contained in:
parent
a2c57a7360
commit
0db5423927
@ -712,9 +712,6 @@ impl LightClient {
|
||||
for (txid, height) in txids_to_fetch {
|
||||
let light_wallet_clone = self.wallet.clone();
|
||||
info!("Fetching full Tx: {}", txid);
|
||||
if print_updates {
|
||||
responses.push(format!("Fetching full Tx: {}", txid));
|
||||
}
|
||||
|
||||
fetch_full_tx(&self.get_server_uri(), txid, self.config.no_cert_verification, move |tx_bytes: &[u8] | {
|
||||
let tx = Transaction::read(tx_bytes).unwrap();
|
||||
|
@ -88,26 +88,6 @@ impl ToBase58Check for [u8] {
|
||||
payload.to_base58()
|
||||
}
|
||||
}
|
||||
//
|
||||
//pub trait FromBase58Check {
|
||||
// fn from_base58check(&self, version: &[u8], suffix: &[u8]) -> Vec<u8>;
|
||||
//}
|
||||
//
|
||||
//
|
||||
//impl FromBase58Check for str {
|
||||
// fn from_base58check(&self, version: &[u8], suffix: &[u8]) -> Vec<u8> {
|
||||
// let mut payload: Vec<u8> = Vec::new();
|
||||
// let bytes = self.from_base58().unwrap();
|
||||
//
|
||||
// let start = version.len();
|
||||
// let end = bytes.len() - (4 + suffix.len());
|
||||
//
|
||||
// payload.extend(&bytes[start..end]);
|
||||
//
|
||||
// payload
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
pub struct LightWallet {
|
||||
seed: [u8; 32], // Seed phrase for this wallet.
|
||||
@ -269,6 +249,9 @@ impl LightWallet {
|
||||
// Write the seed
|
||||
writer.write_all(&self.seed)?;
|
||||
|
||||
// Flush after writing the seed, so in case of a disaster, we can still recover the seed.
|
||||
writer.flush()?;
|
||||
|
||||
// Write all the spending keys
|
||||
Vector::write(&mut writer, &self.extsks.read().unwrap(),
|
||||
|w, sk| sk.write(w)
|
||||
|
Loading…
x
Reference in New Issue
Block a user