Handle string message input for message signing
This commit is contained in:
parent
5810ce25a3
commit
e7820de17f
@ -1,3 +1,5 @@
|
|||||||
|
* 0.4.9
|
||||||
|
- Accept string message format for message signing
|
||||||
* 0.4.8
|
* 0.4.8
|
||||||
- Fix server crash on sign request for unknown key
|
- Fix server crash on sign request for unknown key
|
||||||
* 0.4.7
|
* 0.4.7
|
||||||
|
@ -117,7 +117,10 @@ def eth_signTransaction(tx):
|
|||||||
|
|
||||||
def eth_sign(address, message):
|
def eth_sign(address, message):
|
||||||
logg.debug('got message {} to sign'.format(p[0]))
|
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 = {
|
methods = {
|
||||||
|
2
setup.py
2
setup.py
@ -24,7 +24,7 @@ f.close()
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="crypto-dev-signer",
|
name="crypto-dev-signer",
|
||||||
version="0.4.8",
|
version="0.4.9",
|
||||||
description="A signer and keystore daemon and library for cryptocurrency software development",
|
description="A signer and keystore daemon and library for cryptocurrency software development",
|
||||||
author="Louis Holbrook",
|
author="Louis Holbrook",
|
||||||
author_email="dev@holbrook.no",
|
author_email="dev@holbrook.no",
|
||||||
|
Loading…
Reference in New Issue
Block a user