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

Typically this can occur in a CI environment

(cherry picked from commit 8d700c3b94)
This commit is contained in:
Michael Vines
2020-12-16 17:46:19 -08:00
parent 13d071607f
commit 271eec656c

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()
});