mirror of
https://github.com/Qortal/piratewallet-light-cli.git
synced 2025-07-30 20:01:26 +00:00
Cleanup
This commit is contained in:
@@ -712,9 +712,6 @@ impl LightClient {
|
|||||||
for (txid, height) in txids_to_fetch {
|
for (txid, height) in txids_to_fetch {
|
||||||
let light_wallet_clone = self.wallet.clone();
|
let light_wallet_clone = self.wallet.clone();
|
||||||
info!("Fetching full Tx: {}", txid);
|
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] | {
|
fetch_full_tx(&self.get_server_uri(), txid, self.config.no_cert_verification, move |tx_bytes: &[u8] | {
|
||||||
let tx = Transaction::read(tx_bytes).unwrap();
|
let tx = Transaction::read(tx_bytes).unwrap();
|
||||||
|
@@ -88,26 +88,6 @@ impl ToBase58Check for [u8] {
|
|||||||
payload.to_base58()
|
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 {
|
pub struct LightWallet {
|
||||||
seed: [u8; 32], // Seed phrase for this wallet.
|
seed: [u8; 32], // Seed phrase for this wallet.
|
||||||
@@ -269,6 +249,9 @@ impl LightWallet {
|
|||||||
// Write the seed
|
// Write the seed
|
||||||
writer.write_all(&self.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
|
// Write all the spending keys
|
||||||
Vector::write(&mut writer, &self.extsks.read().unwrap(),
|
Vector::write(&mut writer, &self.extsks.read().unwrap(),
|
||||||
|w, sk| sk.write(w)
|
|w, sk| sk.write(w)
|
||||||
|
Reference in New Issue
Block a user