Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More wallet fun #495

Merged
merged 3 commits into from
Jun 29, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/bin/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Default for WalletConfig {

fn print_usage(program: &str, opts: Options) {
let mut brief = format!("Usage: {} [options]\n\n", program);
brief += " solana-wallet allows you to perform basic actions, including\n";
brief += " solana-wallet allows you to perform basic actions, including";
brief += " requesting an airdrop, checking your balance, and spending tokens.";
brief += " Takes json formatted mint file to stdin.";

Expand Down Expand Up @@ -110,7 +110,7 @@ fn parse_args(args: Vec<String>) -> Result<WalletConfig, Box<error::Error>> {
}
};

if matches.opt_present("h") {
if matches.opt_present("h") || matches.free.len() < 1 {
let program = args[0].clone();
print_usage(&program, opts);
display_actions();
Expand Down Expand Up @@ -232,10 +232,11 @@ fn process_command(

fn display_actions() {
println!("");
println!(" `balance` - Get your account balance");
println!(" `airdrop` - Request a batch of tokens");
println!(" `pay` - Spend your tokens as fast as possible");
println!(" `confirm` - Confirm your last payment by signature");
println!("Commands:");
println!(" balance Get your account balance");
println!(" airdrop Request a batch of tokens");
println!(" pay Spend your tokens as fast as possible");
println!(" confirm Confirm your last payment by signature");
println!("");
}

Expand Down