From 6cf8ac7b32d9f8c8b7983515b2b1c81aec4aa363 Mon Sep 17 00:00:00 2001 From: Jarry Xiao Date: Tue, 1 Aug 2023 11:29:29 -0400 Subject: [PATCH] Fix error message on missing keypair file and update dependencies --- Cargo.toml | 4 ++-- src/main.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 24631a1..a445734 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "phoenix-cli" -version = "0.3.4" +version = "0.3.5" description = "CLI and associated library for interacting with the Phoenix program from the command line" edition = "2021" license = "MIT" @@ -33,7 +33,7 @@ spl-token = { version = "3.2.0", features = ["no-entrypoint"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" spl-associated-token-account = { version = "1.1.1", features = [ "no-entrypoint" ] } -phoenix-v1 = { version = "0.2.2", features = ["no-entrypoint"] } +phoenix-v1 = { version = "=0.2.2", features = ["no-entrypoint"] } phoenix-sdk = "0.4.2" bytemuck = "1.13.0" reqwest = "0.11.14" diff --git a/src/main.rs b/src/main.rs index 57f1f05..79984e9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,7 +60,8 @@ async fn main() -> anyhow::Result<()> { }; let commitment = ConfigInput::compute_commitment_config("", &cli.commitment.unwrap_or(config.commitment)).1; - let payer = get_payer_keypair_from_path(&cli.keypair_path.unwrap_or(config.keypair_path))?; + let payer = get_payer_keypair_from_path(&cli.keypair_path.unwrap_or(config.keypair_path)) + .expect("Keypair file does not exist. Please run `solana-keygen new`"); let network_url = &get_network(&cli.url.unwrap_or(config.json_rpc_url)).to_string(); let client = EllipsisClient::from_rpc( RpcClient::new_with_commitment(network_url.to_string(), commitment),