priestc / moneywagon

Universal bitcoin/altcoin blockchain client library for Python and the command line
http://multiexplorer.com
MIT License
149 stars 48 forks source link

Process of transaction creation is broken #22

Closed illia-v closed 7 years ago

illia-v commented 7 years ago

When I tried to create a transaction, I got such an error:

In [1]: from moneywagon.tx import Transaction

In [2]: tx = Transaction('dash')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-7aa0183c11b6> in <module>()
----> 1 tx = Transaction('dash')

/home/illia-v/.virtualenvs/crypto/local/lib/python2.7/site-packages/moneywagon/tx.pyc in __init__(self, crypto, hex, verbose)
     22 
     23         services = get_optimal_services(self.crypto, 'current_price')
---> 24         self.price_getter = CurrentPrice(services=services, verbose=verbose)
     25 
     26         if hex:

/home/illia-v/.virtualenvs/crypto/local/lib/python2.7/site-packages/moneywagon/core.pyc in __init__(self, services, verbose, responses, timeout, random_wait_seconds)
    363         for ServiceClass in services:
    364             self.services.append(
--> 365                 ServiceClass(verbose=verbose, responses=responses, timeout=timeout)
    366             )
    367 

TypeError: 'str' object is not callable

Looks like the process was broken by 3e1274a976286b16bc7b110fd5300578f539029e, when type of services current_price was transformed from list to dict.