Browse Source

Show message sign when signing

Allow verification by showing the SHA256 hash of the message to be signed (which is also displayed on Ledger).
3.1
Ali Raheem 7 years ago
committed by GitHub
parent
commit
19ba2364b6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      plugins/ledger/ledger.py

3
plugins/ledger/ledger.py

@ -220,10 +220,11 @@ class Ledger_KeyStore(Hardware_KeyStore):
def sign_message(self, sequence, message, password):
self.signing = True
message = message.encode('utf8')
message_hash = hashlib.sha256(message).hexdigest()
# prompt for the PIN before displaying the dialog if necessary
client = self.get_client()
address_path = self.get_derivation()[2:] + "/%d/%d"%sequence
self.handler.show_message("Signing message ...")
self.handler.show_message("Signing message ...\r\nMessage hash: "+message_hash)
try:
info = self.get_client().signMessagePrepare(address_path, message)
pin = ""

Loading…
Cancel
Save