simple_config: implement complex default values
Besides a literal value, the default can now also be a callable, which gets called with the config and evaluated as needed, lazily. This potentially allows e.g. the default value of one configvar to depend on the current value of another configvar.
This commit is contained in:
@@ -206,7 +206,7 @@ class SwapManager(Logger):
|
||||
if swap.prepay_hash is not None:
|
||||
self.prepayments[swap.prepay_hash] = bytes.fromhex(k)
|
||||
# api url
|
||||
self.api_url = wallet.config.get_swapserver_url()
|
||||
self.api_url = wallet.config.SWAPSERVER_URL
|
||||
# init default min & max
|
||||
self.init_min_max_values()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user