From 8880d218b3e64218599ce115c21d7e9342615652 Mon Sep 17 00:00:00 2001 From: Tomas Susanka Date: Fri, 22 Dec 2017 16:42:49 +0100 Subject: [PATCH] HashWriter: extra arguments are passed to the hash function --- src/apps/common/hash_writer.py | 4 ++-- src/apps/ethereum/sign_tx.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/common/hash_writer.py b/src/apps/common/hash_writer.py index 153baf2f02..e546dad792 100644 --- a/src/apps/common/hash_writer.py +++ b/src/apps/common/hash_writer.py @@ -12,5 +12,5 @@ class HashWriter: self.buf[0] = b self.ctx.update(self.buf) - def getvalue(self) -> bytes: - return self.ctx.digest() + def getvalue(self, *args) -> bytes: + return self.ctx.digest(*args) diff --git a/src/apps/ethereum/sign_tx.py b/src/apps/ethereum/sign_tx.py index d651e52e89..648430dea0 100644 --- a/src/apps/ethereum/sign_tx.py +++ b/src/apps/ethereum/sign_tx.py @@ -70,7 +70,7 @@ async def ethereum_sign_tx(ctx, msg): sha.extend(rlp.encode(0)) sha.extend(rlp.encode(0)) - digest = sha.getvalue() + digest = sha.getvalue(True) return await send_signature(ctx, msg, digest)