forked from LBRYCommunity/lbry-sdk
pylint lbry/extras/daemon/exchange_rate_manager.py
This commit is contained in:
parent
88c7cfc745
commit
5dc15be98a
1 changed files with 4 additions and 4 deletions
|
@ -30,9 +30,9 @@ class ExchangeRate:
|
||||||
|
|
||||||
|
|
||||||
class MarketFeed:
|
class MarketFeed:
|
||||||
name: str
|
name: str = ""
|
||||||
market: str
|
market: str = ""
|
||||||
url: str
|
url: str = ""
|
||||||
params = {}
|
params = {}
|
||||||
fee = 0
|
fee = 0
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ class ExchangeRateManager:
|
||||||
|
|
||||||
def convert_currency(self, from_currency, to_currency, amount):
|
def convert_currency(self, from_currency, to_currency, amount):
|
||||||
rates = [market.rate for market in self.market_feeds]
|
rates = [market.rate for market in self.market_feeds]
|
||||||
log.debug("Converting %f %s to %s, rates: %s" % (amount, from_currency, to_currency, rates))
|
log.debug("Converting %f %s to %s, rates: %s", amount, from_currency, to_currency, rates)
|
||||||
if from_currency == to_currency:
|
if from_currency == to_currency:
|
||||||
return round(amount, 8)
|
return round(amount, 8)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue