trezor plugin: update parameters of decrypt_message

This commit is contained in:
ThomasV 2017-02-26 11:01:27 +01:00
parent ff39068867
commit 3d32301121
1 changed files with 2 additions and 3 deletions

View File

@ -27,11 +27,10 @@ class TrezorCompatibleKeyStore(Hardware_KeyStore):
def get_client(self, force_pair=True):
return self.plugin.get_client(self, force_pair)
def decrypt_message(self, pubkey, message, password):
def decrypt_message(self, sequence, message, password):
raise RuntimeError(_('Electrum and %s encryption and decryption are currently incompatible') % self.device)
address = public_key_to_p2pkh(pubkey.decode('hex'))
client = self.get_client()
address_path = self.address_id(address)
address_path = self.get_derivation() + "/%d/%d"%sequence
address_n = client.expand_path(address_path)
payload = base64.b64decode(message)
nonce, message, msg_hmac = payload[:33], payload[33:-8], payload[-8:]