1
0

hw plugins: (cleanup) rm no-op clear_client argument from keystore.give_error

The keystore does not have a "client" field.
One is supposed to use the "get_client" method instead (the generic API is `plugin.get_client(keystore)`)
Remnants of old code.
This commit is contained in:
SomberNight
2022-05-11 19:30:14 +02:00
parent aab8e664ed
commit 6c50d3b0a3
4 changed files with 15 additions and 21 deletions

View File

@@ -280,14 +280,12 @@ class Coldcard_KeyStore(Hardware_KeyStore):
return rv
def give_error(self, message, clear_client=False):
def give_error(self, message):
self.logger.info(message)
if not self.ux_busy:
self.handler.show_error(message)
else:
self.ux_busy = False
if clear_client:
self.client = None
raise UserFacingException(message)
def wrap_busy(func):
@@ -351,7 +349,7 @@ class Coldcard_KeyStore(Hardware_KeyStore):
self.handler.show_error('{}\n\n{}'.format(
_('Error showing address') + ':', str(exc)))
except Exception as e:
self.give_error(e, True)
self.give_error(e)
# give empty bytes for error cases; it seems to clear the old signature box
return b''
@@ -397,7 +395,7 @@ class Coldcard_KeyStore(Hardware_KeyStore):
return
except BaseException as e:
self.logger.exception('')
self.give_error(e, True)
self.give_error(e)
return
tx2 = PartialTransaction.from_raw_psbt(raw_resp)