Fix typo causing change address reuse
This commit is contained in:
parent
3a735d40ac
commit
a0ef42d572
|
@ -951,7 +951,7 @@ class Abstract_Wallet(PrintError):
|
||||||
# gap limit; if none take one at random
|
# gap limit; if none take one at random
|
||||||
addrs = self.accounts[account].get_addresses(1)[-self.gap_limit_for_change:]
|
addrs = self.accounts[account].get_addresses(1)[-self.gap_limit_for_change:]
|
||||||
change_addrs = [addr for addr in addrs if
|
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:
|
if not change_addrs:
|
||||||
change_addrs = [random.choice(addrs)]
|
change_addrs = [random.choice(addrs)]
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -56,7 +56,7 @@ class ExchangeBase(PrintError):
|
||||||
self.quotes = self.get_rates(ccy)
|
self.quotes = self.get_rates(ccy)
|
||||||
self.print_error("received fx quotes")
|
self.print_error("received fx quotes")
|
||||||
self.on_quotes()
|
self.on_quotes()
|
||||||
except Exception, e:
|
except BaseException as e:
|
||||||
self.print_error("failed fx quotes:", e)
|
self.print_error("failed fx quotes:", e)
|
||||||
|
|
||||||
def update(self, ccy):
|
def update(self, ccy):
|
||||||
|
@ -70,7 +70,7 @@ class ExchangeBase(PrintError):
|
||||||
self.history[ccy] = self.historical_rates(ccy)
|
self.history[ccy] = self.historical_rates(ccy)
|
||||||
self.print_error("received fx history for", ccy)
|
self.print_error("received fx history for", ccy)
|
||||||
self.on_history()
|
self.on_history()
|
||||||
except Exception, e:
|
except BaseException as e:
|
||||||
self.print_error("failed fx history:", e)
|
self.print_error("failed fx history:", e)
|
||||||
|
|
||||||
def get_historical_rates(self, ccy):
|
def get_historical_rates(self, ccy):
|
||||||
|
|
Loading…
Reference in New Issue