Skip to content

Commit

Permalink
feat: use full name "liquidity-positions" in pcli
Browse files Browse the repository at this point in the history
Preserves the more convenient "lps" as an alias, which it is.
  • Loading branch information
conorsch committed Oct 25, 2024
1 parent 158fd06 commit b1cf959
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions crates/bin/pcli/src/command/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use anyhow::Result;

use address::AddressCmd;
use balance::BalanceCmd;
use lps::LpsCmd;
use lps::LiquidityPositionsCmd;
use noble_address::NobleAddressCmd;
use staked::StakedCmd;
use transaction_hashes::TransactionHashesCmd;
Expand Down Expand Up @@ -51,7 +51,8 @@ pub enum ViewCmd {
/// Displays a transaction's details by hash.
Tx(TxCmd),
/// View information about the liquidity positions you control.
Lps(LpsCmd),
#[clap(visible_alias = "lps")]
LiquidityPositions(LiquidityPositionsCmd),
}

impl ViewCmd {
Expand All @@ -67,7 +68,7 @@ impl ViewCmd {
ViewCmd::Sync => false,
ViewCmd::ListTransactionHashes(transactions_cmd) => transactions_cmd.offline(),
ViewCmd::Tx(tx_cmd) => tx_cmd.offline(),
ViewCmd::Lps(lps_cmd) => lps_cmd.offline(),
ViewCmd::LiquidityPositions(lps_cmd) => lps_cmd.offline(),
}
}

Expand Down Expand Up @@ -115,7 +116,7 @@ impl ViewCmd {
.exec(&full_viewing_key, view_client, channel)
.await?;
}
ViewCmd::Lps(cmd) => cmd.exec(app).await?,
ViewCmd::LiquidityPositions(cmd) => cmd.exec(app).await?,
}

Ok(())
Expand Down
4 changes: 2 additions & 2 deletions crates/bin/pcli/src/command/view/lps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ use penumbra_view::ViewClient;
use crate::{command::utils, App};

#[derive(Debug, clap::Args)]
pub struct LpsCmd {}
pub struct LiquidityPositionsCmd {}

impl LpsCmd {
impl LiquidityPositionsCmd {
pub fn offline(&self) -> bool {
false
}
Expand Down

0 comments on commit b1cf959

Please sign in to comment.