forked from LBRYCommunity/lbry-sdk
Merge pull request #427 from lbryio/fix_new_address
Prevent excessive generation of new addresses
This commit is contained in:
commit
60195ed6d4
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue