forked from LBRYCommunity/lbry-sdk
max_key_fee is plain YAML now
This commit is contained in:
parent
7a601db23f
commit
0373196707
2 changed files with 2 additions and 5 deletions
|
@ -136,9 +136,6 @@ class MaxKeyFee(Setting[dict]):
|
|||
if currency not in CURRENCIES:
|
||||
raise InvalidCurrencyError(currency)
|
||||
|
||||
serialize = staticmethod(json.dumps)
|
||||
deserialize = staticmethod(json.loads)
|
||||
|
||||
|
||||
class Servers(Setting[list]):
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ class ConfigurationTests(unittest.TestCase):
|
|||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
config = os.path.join(temp_dir, 'settings.yml')
|
||||
with open(config, 'w') as fd:
|
||||
fd.write('max_key_fee: \'{"currency":"USD", "amount":1}\'\n')
|
||||
fd.write('max_key_fee: {currency: USD, amount: 1}\n')
|
||||
c = Config.create_from_arguments(
|
||||
types.SimpleNamespace(config=config)
|
||||
)
|
||||
|
@ -166,4 +166,4 @@ class ConfigurationTests(unittest.TestCase):
|
|||
with c.update_config():
|
||||
c.max_key_fee = {'currency': 'BTC', 'amount': 1}
|
||||
with open(config, 'r') as fd:
|
||||
self.assertEqual(fd.read(), 'max_key_fee: \'{"currency": "BTC", "amount": 1}\'\n')
|
||||
self.assertEqual(fd.read(), 'max_key_fee:\n amount: 1\n currency: BTC\n')
|
||||
|
|
Loading…
Reference in a new issue