do not create new addresses in lbryum, get unused ones

This commit is contained in:
Kay Kurokawa 2017-01-18 20:15:40 -05:00
parent 91d673a539
commit 8628b127f7

View file

@ -1035,7 +1035,10 @@ class LBRYumWallet(Wallet):
return d return d
def get_new_address(self): def get_new_address(self):
d = defer.succeed(self.wallet.create_new_address()) addr = self.wallet.get_unused_address(account=None)
if addr is None:
addr = self.wallet.create_new_address()
d = defer.succeed(addr)
d.addCallback(self._save_wallet) d.addCallback(self._save_wallet)
return d return d