wallet: try detecting internal address corruption
This commit is contained in:
@@ -31,6 +31,7 @@ from electrum.i18n import _
|
||||
from electrum.util import format_time, age
|
||||
from electrum.plugin import run_hook
|
||||
from electrum.paymentrequest import PR_UNKNOWN
|
||||
from electrum.wallet import InternalAddressCorruption
|
||||
|
||||
from .util import MyTreeView, pr_tooltips, pr_icons
|
||||
|
||||
@@ -78,7 +79,11 @@ class RequestList(MyTreeView):
|
||||
# update the receive address if necessary
|
||||
current_address = self.parent.receive_address_e.text()
|
||||
domain = self.wallet.get_receiving_addresses()
|
||||
addr = self.wallet.get_unused_address()
|
||||
try:
|
||||
addr = self.wallet.get_unused_address()
|
||||
except InternalAddressCorruption as e:
|
||||
self.parent.show_error(str(e))
|
||||
addr = ''
|
||||
if not current_address in domain and addr:
|
||||
self.parent.set_receive_address(addr)
|
||||
self.parent.new_request_button.setEnabled(addr != current_address)
|
||||
|
||||
Reference in New Issue
Block a user