message: cease accepting an Address object
This commit is contained in:
parent
588b346f5d
commit
e9193df290
2 changed files with 1 additions and 10 deletions
|
@ -47,7 +47,7 @@ function verify (address, signature, message, network) {
|
||||||
network: network
|
network: network
|
||||||
})
|
})
|
||||||
|
|
||||||
return keyPair.getAddress() === address.toString()
|
return keyPair.getAddress() === address
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
|
@ -4,7 +4,6 @@ var assert = require('assert')
|
||||||
var message = require('../src/message')
|
var message = require('../src/message')
|
||||||
var networks = require('../src/networks')
|
var networks = require('../src/networks')
|
||||||
|
|
||||||
var Address = require('../src/address')
|
|
||||||
var BigInteger = require('bigi')
|
var BigInteger = require('bigi')
|
||||||
var ECPair = require('../src/ecpair')
|
var ECPair = require('../src/ecpair')
|
||||||
|
|
||||||
|
@ -23,14 +22,6 @@ describe('message', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('verify', 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) {
|
fixtures.valid.verify.forEach(function (f) {
|
||||||
it('verifies a valid signature for "' + f.message + '" (' + f.network + ')', function () {
|
it('verifies a valid signature for "' + f.message + '" (' + f.network + ')', function () {
|
||||||
var network = networks[f.network]
|
var network = networks[f.network]
|
||||||
|
|
Loading…
Add table
Reference in a new issue