Skip to content

Commit

Permalink
chore: remove deprecated wallet deposit cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonPaulGithub authored and RolandSherwin committed Apr 16, 2024
1 parent ccce41b commit 445da43
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
1 change: 0 additions & 1 deletion sn_cli/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ async fn main() -> Result<()> {
if let SubCmd::Wallet(cmds) = &opt.cmd {
if let WalletCmds::Address
| WalletCmds::Balance { .. }
| WalletCmds::Deposit { .. }
| WalletCmds::Create { .. }
| WalletCmds::Sign { .. } = cmds
{
Expand Down
26 changes: 0 additions & 26 deletions sn_cli/src/bin/subcommands/wallet/hot_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,6 @@ pub enum WalletCmds {
#[clap(long)]
peer_id: Vec<String>,
},
/// DEPRECATED will be removed in future versions.
/// Prefer using the send and receive commands instead.
///
/// Deposit CashNotes from the received directory to the local wallet.
/// Or Read a hex encoded CashNote from stdin.
///
/// The default received directory is platform specific:
/// - Linux: $HOME/.local/share/safe/wallet/cash_notes
/// - macOS: $HOME/Library/Application Support/safe/wallet/cash_notes
/// - Windows: C:\Users\{username}\AppData\Roaming\safe\wallet\cash_notes
///
/// If you find the default path unwieldy, you can also set the RECEIVED_CASHNOTES_PATH environment
/// variable to a path you would prefer to work with.
#[clap(verbatim_doc_comment)]
Deposit {
/// Read a hex encoded CashNote from stdin.
#[clap(long, default_value = "false")]
stdin: bool,
/// The hex encoded CashNote.
#[clap(long)]
cash_note: Option<String>,
},
/// Create a hot wallet from the given (hex-encoded) key.
Create {
/// Hex-encoded main secret key.
Expand Down Expand Up @@ -161,10 +139,6 @@ pub(crate) async fn wallet_cmds_without_client(cmds: &WalletCmds, root_dir: &Pat
}
Ok(())
}
WalletCmds::Deposit { stdin, cash_note } => {
let mut wallet = WalletApiHelper::load_from(root_dir)?;
wallet.deposit(*stdin, cash_note.as_deref())
}
WalletCmds::Create { key } => {
let sk = SecretKey::from_hex(key)
.map_err(|err| eyre!("Failed to parse hex-encoded SK: {err:?}"))?;
Expand Down

0 comments on commit 445da43

Please sign in to comment.