aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-01-17 15:26:37 +0800
committerDan Finlay <dan@danfinlay.com>2017-01-17 15:26:37 +0800
commit7e886dff778f7772f5664491a1255614c08483f2 (patch)
tree58987effb0ad32a63ea14fe0f1b725ca82775e3a /test
parent528ceff07c01371feaa147bb850452eab30ea2e0 (diff)
downloadtangerine-wallet-browser-7e886dff778f7772f5664491a1255614c08483f2.tar
tangerine-wallet-browser-7e886dff778f7772f5664491a1255614c08483f2.tar.gz
tangerine-wallet-browser-7e886dff778f7772f5664491a1255614c08483f2.tar.bz2
tangerine-wallet-browser-7e886dff778f7772f5664491a1255614c08483f2.tar.lz
tangerine-wallet-browser-7e886dff778f7772f5664491a1255614c08483f2.tar.xz
tangerine-wallet-browser-7e886dff778f7772f5664491a1255614c08483f2.tar.zst
tangerine-wallet-browser-7e886dff778f7772f5664491a1255614c08483f2.zip
Wrote failing test for eth.sign
Diffstat (limited to 'test')
-rw-r--r--test/unit/keyrings/simple-test.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/unit/keyrings/simple-test.js b/test/unit/keyrings/simple-test.js
index 687318f99..77eeb834c 100644
--- a/test/unit/keyrings/simple-test.js
+++ b/test/unit/keyrings/simple-test.js
@@ -49,6 +49,24 @@ describe('simple-keyring', function() {
})
})
+ describe('#signMessage', function() {
+ const address = '0x9858e7d8b79fc3e6d989636721584498926da38a'
+ const message = '0x879a053d4800c6354e76c7985a865d2922c82fb5b3f4577b2fe08b998954f2e0'
+ const privateKey = '0x7dd98753d7b4394095de7d176c58128e2ed6ee600abe97c9f6d9fd65015d9b18'
+ const expectedResult = '0x28fcb6768e5110144a55b2e6ce9d1ea5a58103033632d272d2b5cf506906f7941a00b539383fd872109633d8c71c404e13dba87bc84166ee31b0e36061a69e161c'
+
+ it('passes the dennis test', function(done) {
+ keyring.deserialize([ privateKey ])
+ .then(() => {
+ return keyring.signMessage(address, message)
+ })
+ .then((result) => {
+ assert.equal(result, expectedResult)
+ done()
+ })
+ })
+ })
+
describe('#addAccounts', function() {
describe('with no arguments', function() {
it('creates a single wallet', function() {