Skip to content

Commit

Permalink
Fix WASM32 build
Browse files Browse the repository at this point in the history
  • Loading branch information
aspect committed Feb 25, 2024
1 parent 52046e6 commit bf55c3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions core/src/modules/settings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,12 @@ impl Settings {
core.settings = self.settings.clone();
core.settings.store_sync().unwrap();

let storage_root = core.settings.node.kaspad_daemon_storage_folder_enable.then_some(core.settings.node.kaspad_daemon_storage_folder.as_str());
core.storage.track_storage_root(storage_root);
cfg_if! {
if #[cfg(not(target_arch = "wasm32"))] {
let storage_root = core.settings.node.kaspad_daemon_storage_folder_enable.then_some(core.settings.node.kaspad_daemon_storage_folder.as_str());
core.storage.track_storage_root(storage_root);
}
}

if restart {
self.runtime.kaspa_service().update_services(&self.settings.node, None);
Expand Down
2 changes: 1 addition & 1 deletion core/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub enum Network {
impl std::fmt::Display for Network {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Network::Mainnet => write!(f, "mainnet" ),
Network::Mainnet => write!(f, "mainnet"),
Network::Testnet10 => write!(f, "testnet-10"),
Network::Testnet11 => write!(f, "testnet-11"),
}
Expand Down

0 comments on commit bf55c3b

Please sign in to comment.