|
47 | 47 | InvalidPassword, format_time, timestamp_to_datetime, Satoshis, |
48 | 48 | Fiat, bfh, bh2u, TxMinedInfo, quantize_feerate, create_bip21_uri, OrderedDictWithIndex) |
49 | 49 | from .util import PR_TYPE_ADDRESS, PR_TYPE_BIP70, PR_TYPE_LN |
50 | | -from .simple_config import get_config |
| 50 | +from .simple_config import SimpleConfig |
51 | 51 | from .bitcoin import (COIN, TYPE_ADDRESS, is_address, address_to_script, |
52 | 52 | is_minikey, relayfee, dust_threshold) |
53 | 53 | from .crypto import sha256d |
|
71 | 71 |
|
72 | 72 | if TYPE_CHECKING: |
73 | 73 | from .network import Network |
74 | | - from .simple_config import SimpleConfig |
75 | 74 |
|
76 | 75 |
|
77 | 76 | _logger = get_logger(__name__) |
@@ -236,7 +235,9 @@ def __init__(self, storage: WalletStorage): |
236 | 235 |
|
237 | 236 | self.contacts = Contacts(self.storage) |
238 | 237 | self._coin_price_cache = {} |
239 | | - self.config = get_config() |
| 238 | + # TODO config should be passed as a param instead? SimpleConfig should not be a singleton. |
| 239 | + self.config = SimpleConfig.get_instance() |
| 240 | + assert self.config is not None, "config must not be None" |
240 | 241 | self.lnworker = LNWallet(self) if self.config.get('lightning') else None |
241 | 242 |
|
242 | 243 | def stop_threads(self): |
|
0 commit comments