Skip to content

Commit

Permalink
feat(decompile): default openai_api_key to configured value if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon-Becker committed Dec 9, 2024
1 parent 3a02389 commit ec1547f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ async fn main() -> Result<()> {
cmd.rpc_url = configuration.rpc_url;
}

// if the user has not specified a openai api key, use the default
if cmd.openai_api_key.as_str() == "" {
cmd.openai_api_key = configuration.openai_api_key;
}

// if the user has passed an output filename, override the default filename
let mut abi_filename: String = "abi.json".to_string();
let mut decompiled_output_filename: String = "decompiled".to_string();
Expand Down

0 comments on commit ec1547f

Please sign in to comment.