From e9193df2901f35f95093bd1a06238c2ab5e54e84 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Wed, 8 Jul 2015 15:45:59 +1000 Subject: [PATCH] message: cease accepting an Address object --- src/message.js | 2 +- test/message.js | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/message.js b/src/message.js index eddf55a..b2c584c 100644 --- a/src/message.js +++ b/src/message.js @@ -47,7 +47,7 @@ function verify (address, signature, message, network) { network: network }) - return keyPair.getAddress() === address.toString() + return keyPair.getAddress() === address } module.exports = { diff --git a/test/message.js b/test/message.js index b478a66..fb116b0 100644 --- a/test/message.js +++ b/test/message.js @@ -4,7 +4,6 @@ var assert = require('assert') var message = require('../src/message') var networks = require('../src/networks') -var Address = require('../src/address') var BigInteger = require('bigi') var ECPair = require('../src/ecpair') @@ -23,14 +22,6 @@ describe('message', function () { }) describe('verify', function () { - it('accepts an Address object', function () { - var f = fixtures.valid.verify[0] - var network = networks[f.network] - - var address = Address.fromBase58Check(f.address) - assert(message.verify(address, f.signature, f.message, network)) - }) - fixtures.valid.verify.forEach(function (f) { it('verifies a valid signature for "' + f.message + '" (' + f.network + ')', function () { var network = networks[f.network]