mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-03-20 05:16:08 -04:00
Fix monero-wallet-rpc
startup for mainnet CLI
There is no `--mainnet` flag. Since we cannot just pass an empty string to `.arg()` we use the `.args()` method to pass nothing for mainnet and the respective flags for stagenet and testnet.
This commit is contained in:
parent
1aaffb09f9
commit
4dd696ebe1
@ -126,15 +126,23 @@ impl WalletRpc {
|
||||
"Starting monero-wallet-rpc on"
|
||||
);
|
||||
|
||||
let network_flag = match network {
|
||||
Network::Mainnet => {
|
||||
vec![]
|
||||
}
|
||||
Network::Stagenet => {
|
||||
vec!["--stagenet"]
|
||||
}
|
||||
Network::Testnet => {
|
||||
vec!["--testnet"]
|
||||
}
|
||||
};
|
||||
|
||||
let mut child = Command::new(self.exec_path())
|
||||
.env("LANG", "en_AU.UTF-8")
|
||||
.stdout(Stdio::piped())
|
||||
.kill_on_drop(true)
|
||||
.arg(match network {
|
||||
Network::Mainnet => "--mainnet",
|
||||
Network::Stagenet => "--stagenet",
|
||||
Network::Testnet => "--testnet",
|
||||
})
|
||||
.args(network_flag)
|
||||
.arg("--daemon-address")
|
||||
.arg(daemon_address)
|
||||
.arg("--rpc-bind-port")
|
||||
|
Loading…
x
Reference in New Issue
Block a user