Browse Source

Fix typo causing change address reuse

283
Neil Booth 9 years ago
parent
commit
a0ef42d572
  1. 2
      lib/wallet.py
  2. 6
      plugins/exchange_rate/exchange_rate.py

2
lib/wallet.py

@ -951,7 +951,7 @@ class Abstract_Wallet(PrintError):
# gap limit; if none take one at random
addrs = self.accounts[account].get_addresses(1)[-self.gap_limit_for_change:]
change_addrs = [addr for addr in addrs if
self.get_num_tx(change_addr) == 0]
self.get_num_tx(addr) == 0]
if not change_addrs:
change_addrs = [random.choice(addrs)]
else:

6
plugins/exchange_rate/exchange_rate.py

@ -56,7 +56,7 @@ class ExchangeBase(PrintError):
self.quotes = self.get_rates(ccy)
self.print_error("received fx quotes")
self.on_quotes()
except Exception, e:
except BaseException as e:
self.print_error("failed fx quotes:", e)
def update(self, ccy):
@ -70,7 +70,7 @@ class ExchangeBase(PrintError):
self.history[ccy] = self.historical_rates(ccy)
self.print_error("received fx history for", ccy)
self.on_history()
except Exception, e:
except BaseException as e:
self.print_error("failed fx history:", e)
def get_historical_rates(self, ccy):
@ -209,7 +209,7 @@ class CoinDesk(ExchangeBase):
% (start, end))
json = self.get_json('api.coindesk.com', query)
return json['bpi']
class Coinsecure(ExchangeBase):
def get_rates(self, ccy):
json = self.get_json('api.coinsecure.in', '/v0/noauth/newticker')

Loading…
Cancel
Save