Skip to content

Commit

Permalink
Add file path to keypair error
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldjeffrey committed Dec 20, 2024
1 parent 2119faf commit 7c7bf75
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion solana/src/burn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ impl SolanaRpc {
let dc_mint = settings.dc_mint.parse()?;
let dnt_mint = settings.dnt_mint.parse()?;
let Ok(keypair) = read_keypair_file(&settings.burn_keypair) else {
return Err(SolanaRpcError::FailedToReadKeypairError);
return Err(SolanaRpcError::FailedToReadKeypairError(
settings.burn_keypair.to_owned(),
));
};
let provider =
RpcClient::new_with_commitment(settings.rpc_url.clone(), CommitmentConfig::finalized());
Expand Down
4 changes: 2 additions & 2 deletions solana/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ pub enum SolanaRpcError {
InvalidKeypair,
#[error("System time error: {0}")]
SystemTimeError(#[from] SystemTimeError),
#[error("Failed to read keypair file")]
FailedToReadKeypairError,
#[error("Failed to read keypair file: {0}")]
FailedToReadKeypairError(String),
#[error("crypto error: {0}")]
Crypto(#[from] helium_crypto::Error),
}
Expand Down
4 changes: 3 additions & 1 deletion solana/src/start_boost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ pub struct SolanaRpc {
impl SolanaRpc {
pub async fn new(settings: &Settings) -> Result<Arc<Self>, SolanaRpcError> {
let Ok(keypair) = read_keypair_file(&settings.start_authority_keypair) else {
return Err(SolanaRpcError::FailedToReadKeypairError);
return Err(SolanaRpcError::FailedToReadKeypairError(
settings.start_authority_keypair.to_owned(),
));
};
let provider =
RpcClient::new_with_commitment(settings.rpc_url.clone(), CommitmentConfig::finalized());
Expand Down

0 comments on commit 7c7bf75

Please sign in to comment.