From e0ca959796361c11e3470e0f61addd7a154975da Mon Sep 17 00:00:00 2001 From: Cryptoforge Date: Wed, 3 Mar 2021 21:12:13 -0800 Subject: [PATCH] port to pirate --- cli/src/main.rs | 2 +- docker/Dockerfile | 6 +++--- lib/src/commands.rs | 20 ++++++++++---------- lib/src/lightclient.rs | 6 +++--- lib/src/lightwallet/bugs.rs | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index 269476c..bf9aa7a 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -10,7 +10,7 @@ use log::error; pub fn main() { // Get command line arguments use clap::{App, Arg}; - let fresh_app = App::new("Zecwallet CLI"); + let fresh_app = App::new("Arrrwallet CLI"); let configured_app = configure_clapapp!(fresh_app); let matches = configured_app.get_matches(); diff --git a/docker/Dockerfile b/docker/Dockerfile index 00c4027..9f78667 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -37,7 +37,7 @@ RUN cd /opt && wget https://download.libsodium.org/libsodium/releases/libsodium- RUN apt install -y git # Cargo fetch the dependencies so we don't download them over and over again -RUN cd /tmp && git clone https://github.com/adityapk00/zecwallet-light-cli.git && \ - cd zecwallet-light-cli && \ +RUN cd /tmp && git clone https://github.com/piratenetwork/piratewallet-light-cli.git && \ + cd piratewallet-light-cli && \ cargo fetch && \ - cd /tmp && rm -rf zecwallet-light-cli + cd /tmp && rm -rf piratewallet-light-cli diff --git a/lib/src/commands.rs b/lib/src/commands.rs index 2875b68..1dafbed 100644 --- a/lib/src/commands.rs +++ b/lib/src/commands.rs @@ -205,17 +205,17 @@ struct BalanceCommand {} impl Command for BalanceCommand { fn help(&self) -> String { let mut h = vec![]; - h.push("Show the current ZEC balance in the wallet"); + h.push("Show the current ARRR balance in the wallet"); h.push("Usage:"); h.push("balance"); h.push(""); - h.push("Transparent and Shielded balances, along with the addresses they belong to are displayed"); + h.push("Shielded balances, along with the addresses they belong to are displayed"); h.join("\n") } fn short_help(&self) -> String { - "Show the current ZEC balance in the wallet".to_string() + "Show the current ARRR balance in the wallet".to_string() } fn exec(&self, _args: &[&str], lightclient: &LightClient) -> String { @@ -250,14 +250,14 @@ impl Command for ExportCommand { fn help(&self) -> String { let mut h = vec![]; h.push("Export private key for an individual wallet addresses."); - h.push("Note: To backup the whole wallet, use the 'seed' command insted"); + h.push("Note: To backup the whole wallet, use the 'seed' command instead"); h.push("Usage:"); - h.push("export [t-address or z-address]"); + h.push("export [z-address]"); h.push(""); h.push("If no address is passed, private key for all addresses in the wallet are exported."); h.push(""); h.push("Example:"); - h.push("export ztestsapling1x65nq4dgp0qfywgxcwk9n0fvm4fysmapgr2q00p85ju252h6l7mmxu2jg9cqqhtvzd69jwhgv8d"); + h.push("export zs1x65nq4dgp0qfywgxcwk9n0fvm4fysmapgr2q00p85ju252h6l7mmxu2jg9cqqhtvzd69jwhgv8d"); h.join("\n") } @@ -284,7 +284,7 @@ impl Command for EncryptCommand { fn help(&self) -> String { let mut h = vec![]; h.push("Encrypt the wallet with a password"); - h.push("Note 1: This will encrypt the seed and the sapling and transparent private keys."); + h.push("Note 1: This will encrypt the seed and the private keys."); h.push(" Use 'unlock' to temporarily unlock the wallet for spending or 'decrypt' "); h.push(" to permanatly remove the encryption"); h.push("Note 2: If you forget the password, the only way to recover the wallet is to restore"); @@ -324,7 +324,7 @@ impl Command for DecryptCommand { fn help(&self) -> String { let mut h = vec![]; h.push("Completely remove wallet encryption, storing the wallet in plaintext on disk"); - h.push("Note 1: This will decrypt the seed and the sapling and transparent private keys and store them on disk."); + h.push("Note 1: This will decrypt the seed and the private keys and store them on disk."); h.push(" Use 'unlock' to temporarily unlock the wallet for spending"); h.push("Note 2: If you've forgotten the password, the only way to recover the wallet is to restore"); h.push(" from the seed phrase."); @@ -444,7 +444,7 @@ struct SendCommand {} impl Command for SendCommand { fn help(&self) -> String { let mut h = vec![]; - h.push("Send ZEC to a given address(es)"); + h.push("Send ARRR to a given address(es)"); h.push("Usage:"); h.push("send '{'input':
, 'output': [{'address':
, 'amount': , 'memo': }, ...]}"); h.push(""); @@ -456,7 +456,7 @@ impl Command for SendCommand { } fn short_help(&self) -> String { - "Send ZEC to the given address".to_string() + "Send ARRR to the given address".to_string() } fn exec(&self, args: &[&str], lightclient: &LightClient) -> String { diff --git a/lib/src/lightclient.rs b/lib/src/lightclient.rs index e109229..b237408 100644 --- a/lib/src/lightclient.rs +++ b/lib/src/lightclient.rs @@ -172,13 +172,13 @@ impl LightClientConfig { } else { if cfg!(target_os="macos") || cfg!(target_os="windows") { zcash_data_location = dirs::data_dir().expect("Couldn't determine app data directory!"); - zcash_data_location.push("Zero"); + zcash_data_location.push("Pirate"); } else { if dirs::home_dir().is_none() { info!("Couldn't determine home dir!"); } zcash_data_location = dirs::home_dir().expect("Couldn't determine home directory!"); - zcash_data_location.push(".zero"); + zcash_data_location.push(".pirate"); }; match &self.chain_name[..] { @@ -770,7 +770,7 @@ impl LightClient { } }).collect::>(); - // Collect t addresses + // Collect t addresses - not required for pirate let t_addresses = wallet.taddresses.read().unwrap().iter().map( |address| { // Get the balance for this address let balance = wallet.tbalance(Some(address.clone())); diff --git a/lib/src/lightwallet/bugs.rs b/lib/src/lightwallet/bugs.rs index 2aab2ec..e005ef4 100644 --- a/lib/src/lightwallet/bugs.rs +++ b/lib/src/lightwallet/bugs.rs @@ -73,7 +73,7 @@ impl BugBip39Derivation { } // Tranfer money - // 1. The desination is z address #0 + // 1. The destination is z address #0 let zaddr = client.do_address()["z_addresses"][0].as_str().unwrap().to_string(); let balance_json = client.do_balance(); let amount: u64 = balance_json["zbalance"].as_u64().unwrap()