Use an ephemeral mint address if the client keypair is not available

Typically this can occur in a CI environment
This commit is contained in:
Michael Vines 2020-12-16 17:46:19 -08:00
parent edbeb5fe92
commit 8d700c3b94
1 changed files with 2 additions and 8 deletions

View File

@ -143,14 +143,8 @@ fn main() {
};
let mint_address = pubkey_of(&matches, "mint_address").unwrap_or_else(|| {
read_keypair_file(&cli_config.keypair_path)
.unwrap_or_else(|err| {
eprintln!(
"Error: Unable to read keypair file {}: {}",
cli_config.keypair_path, err
);
exit(1);
})
read_keypair_file(dbg!(&cli_config.keypair_path))
.unwrap_or_else(|_| Keypair::new())
.pubkey()
});