cmd/loopd: only replace testnet swapserver if not already set

pull/52/head
Olaoluwa Osuntokun 5 years ago
parent 893954e69b
commit f1f72bb2d1
No known key found for this signature in database
GPG Key ID: CE58F7F8E20FD9A2

@ -26,9 +26,10 @@ func daemon(config *config) error {
}
defer lnd.Close()
// If the user is targeting the testnet network, then we'll point
// towards the testnet swap server rather than the mainnet endpoint.
if config.Network == "testnet" {
// If the user is targeting the testnet network, and they haven't
// specified new swap server, then we'll point towards the testnet swap
// server rather than the mainnet endpoint.
if config.Network == "testnet" && config.SwapServer == "" {
config.SwapServer = testnetServer
}

Loading…
Cancel
Save