Simplify services (watchtower, payserver):
- Do not expose services settings in GUI - Use a single netaddress configuration variable.
This commit is contained in:
@@ -9,6 +9,7 @@ from typing import Union, Optional
|
||||
from numbers import Real
|
||||
|
||||
from copy import deepcopy
|
||||
from aiorpcx import NetAddress
|
||||
|
||||
from . import util
|
||||
from . import constants
|
||||
@@ -592,6 +593,15 @@ class SimpleConfig(Logger):
|
||||
SSL_identity = None
|
||||
return SSL_identity
|
||||
|
||||
def get_netaddress(self, key: str) -> Optional[NetAddress]:
|
||||
text = self.get(key)
|
||||
if text:
|
||||
try:
|
||||
host, port = text.split(':')
|
||||
return NetAddress(host, port)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
def read_user_config(path):
|
||||
"""Parse and store the user config settings in electrum.conf into user_config[]."""
|
||||
|
||||
Reference in New Issue
Block a user