coinchooser methods should not belong in wallet class
This commit is contained in:
@@ -308,3 +308,13 @@ class CoinChooserPrivacy(CoinChooserRandom):
|
||||
|
||||
COIN_CHOOSERS = {'Priority': CoinChooserOldestFirst,
|
||||
'Privacy': CoinChooserPrivacy}
|
||||
|
||||
def get_name(config):
|
||||
kind = config.get('coin_chooser')
|
||||
if not kind in COIN_CHOOSERS:
|
||||
kind = 'Priority'
|
||||
return kind
|
||||
|
||||
def get_coin_chooser(config):
|
||||
klass = COIN_CHOOSERS[get_name(config)]
|
||||
return klass()
|
||||
|
||||
Reference in New Issue
Block a user