Skip to content

Commit

Permalink
Merge pull request #30 from bithyve/fix-network-name-emit
Browse files Browse the repository at this point in the history
Fix network sent to server
  • Loading branch information
ben-kaufman authored Sep 17, 2024
2 parents 9b87e4d + 510dd8f commit f5f5f92
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src-tauri/src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ impl Channel {
if let Some(client) = &self.client {
let mut data = json!({"room": room, "data": encrypted});
if let Some(network) = network {
data["network"] = serde_json::Value::String(network.to_string());
data["network"] = serde_json::Value::String(if network == "bitcoin" {
"MAINNET".to_string()
} else {
"TESTNET".to_string()
});
}
client
.emit(event, data)
Expand Down

0 comments on commit f5f5f92

Please sign in to comment.