msg="Enter your Ledger PIN - remaining attempts : "+str(remaining_attempts)
else:
msg="Enter your Ledger PIN - WARNING : LAST ATTEMPT. If the PIN is not correct, the dongle will be wiped."
@ -136,7 +136,7 @@ class Ledger_Client():
raiseException('Aborted by user - please unplug the dongle and plug it again before retrying')
pin=pin.encode()
self.dongleObject.verifyPin(pin)
exceptBTChipException,e:
exceptBTChipExceptionase:
if(e.sw==0x6faa):
raiseException("Dongle is temporarily locked - please unplug it and replug it again")
if((e.sw&0xFFF0)==0x63c0):
@ -225,7 +225,7 @@ class Ledger_KeyStore(Hardware_KeyStore):
raiseUserWarning(_('Cancelled by user'))
pin=str(pin).encode()
signature=self.get_client().signMessageSign(pin)
exceptBTChipException,e:
exceptBTChipExceptionase:
ife.sw==0x6a80:
self.give_error("Unfortunately, this message cannot be signed by the Ledger wallet. Only alphanumerical messages shorter than 140 characters are supported. Please remove any extra characters (tab, carriage return) and retry.")
else:
@ -233,7 +233,7 @@ class Ledger_KeyStore(Hardware_KeyStore):
exceptUserWarning:
self.handler.show_error(_('Cancelled by user'))
return''
exceptException,e:
exceptExceptionase:
self.give_error(e,True)
finally:
self.handler.clear_dialog()
@ -469,7 +469,7 @@ class LedgerPlugin(HW_PluginBase):
self.handler=handler
client=self.get_btchip_device(device)
ifclient<>None:
ifclientisnotNone:
client=Ledger_Client(client)
returnclient
@ -501,6 +501,6 @@ class LedgerPlugin(HW_PluginBase):
# returns the client for a given keystore. can use xpub