mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 09:21:39 +00:00
moar fixes
This commit is contained in:
parent
46eeb9c767
commit
b97dbcb810
3 changed files with 7 additions and 4 deletions
|
@ -288,9 +288,12 @@ class Coinsecure(ExchangeBase):
|
|||
return {'INR': Decimal(json['lastprice'] / 100.0 )}
|
||||
|
||||
class CoinMarketCap(ExchangeBase):
|
||||
|
||||
async def get_rates(self, ccy):
|
||||
ccys = ['USD']
|
||||
json = await self.get_json('api.coinmarketcap.com', '/v2/ticker/1298/?convert=BTC')
|
||||
return {'LBC': Decimal(json['quotes']['USD']['price'])}
|
||||
result[ccy] = Decimal(json['quotes']['USD']['price'])
|
||||
return result
|
||||
|
||||
class Foxbit(ExchangeBase):
|
||||
|
||||
|
@ -492,7 +495,7 @@ class FxThread(ThreadJob):
|
|||
self.exchange.update(self.ccy)
|
||||
|
||||
def is_enabled(self):
|
||||
return bool(self.config.get('use_exchange_rate'))
|
||||
return bool(self.config.get('use_exchange_rate'), True)
|
||||
|
||||
def set_enabled(self, b):
|
||||
self.config.set_key('use_exchange_rate', bool(b))
|
||||
|
|
|
@ -2730,7 +2730,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
|||
fee_type_label = HelpLabel(_('Fee estimation') + ':', msg)
|
||||
fee_type_combo = QComboBox()
|
||||
fee_type_combo.addItems([_('Static')])
|
||||
fee_type_combo.setCurrentIndex((2 if self.config.use_mempool_fees() else 1) if self.config.is_dynfee() else 0)
|
||||
fee_type_combo.setCurrentIndex(0)
|
||||
def on_fee_type(x):
|
||||
self.config.set_key('mempool_fees', x==2)
|
||||
self.config.set_key('dynamic_fees', x>0)
|
||||
|
|
|
@ -60,7 +60,7 @@ base_units = {'LBC':8, 'mLBC':5, 'deweys':2, 'dewey':0}
|
|||
base_units_inverse = inv_dict(base_units)
|
||||
base_units_list = ['LBC', 'mLBC', 'deweys', 'dewey'] # list(dict) does not guarantee order
|
||||
|
||||
DECIMAL_POINT_DEFAULT = 5 # mBTC
|
||||
DECIMAL_POINT_DEFAULT = 8 # mBTC
|
||||
|
||||
|
||||
class UnknownBaseUnit(Exception): pass
|
||||
|
|
Loading…
Add table
Reference in a new issue