funga

Signer and keystore daemon and library for cryptocurrency software development
Log | Files | Refs | README | LICENSE

commit e7820de17fa67c5c8386aac029fec19de26226c7
parent 5810ce25a3b92a499e5a709fb16b4b44aad82d76
Author: nolash <dev@holbrook.no>
Date:   Fri, 25 Dec 2020 11:56:33 +0100

Handle string message input for message signing

Diffstat:
MCHANGELOG | 2++
Mcrypto_dev_signer/runnable/signer.py | 5++++-
Msetup.py | 2+-
3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,3 +1,5 @@ +* 0.4.9 + - Accept string message format for message signing * 0.4.8 - Fix server crash on sign request for unknown key * 0.4.7 diff --git a/crypto_dev_signer/runnable/signer.py b/crypto_dev_signer/runnable/signer.py @@ -117,7 +117,10 @@ def eth_signTransaction(tx): def eth_sign(address, message): logg.debug('got message {} to sign'.format(p[0])) - return signer.signEthereumMessage(address, message) + message_type = type(message).__name__ + if message_type != 'str': + raise ValueError('invalid message format, must be {}, not {}'.format(message_type)) + return signer.signEthereumMessage(address, message.encode('utf-8')) methods = { diff --git a/setup.py b/setup.py @@ -24,7 +24,7 @@ f.close() setup( name="crypto-dev-signer", - version="0.4.8", + version="0.4.9", description="A signer and keystore daemon and library for cryptocurrency software development", author="Louis Holbrook", author_email="dev@holbrook.no",