Skip to content

Commit

Permalink
Update forc-plugins/forc-node/src/chain_config.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Joshua Batty <[email protected]>
  • Loading branch information
kayagokalp and JoshuaBatty authored Dec 12, 2024
1 parent deb57e5 commit 5873fab
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions forc-plugins/forc-node/src/chain_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ impl Display for ChainConfig {
}
impl From<ChainConfig> for PathBuf {
fn from(value: ChainConfig) -> Self {
let user_forc_dir = user_forc_directory().join(CONFIG_FOLDER);

match value {
ChainConfig::Local => user_forc_dir.join(LOCAL_CONFIG_FOLDER_NAME),
ChainConfig::Testnet => user_forc_dir.join(TESTNET_CONFIG_FOLDER_NAME),
ChainConfig::Ignition => user_forc_dir.join(IGNITION_CONFIG_FOLDER_NAME),
}
let folder_name = match value {
ChainConfig::Local => LOCAL_CONFIG_FOLDER_NAME,
ChainConfig::Testnet => TESTNET_CONFIG_FOLDER_NAME,
ChainConfig::Ignition => IGNITION_CONFIG_FOLDER_NAME,
};
user_forc_directory().join(CONFIG_FOLDER).join(folder_name)
}
}

Expand Down

0 comments on commit 5873fab

Please sign in to comment.