message: remove unnecessary verbosity
This commit is contained in:
parent
1b57f0871d
commit
98bc1685b3
1 changed files with 1 additions and 6 deletions
|
@ -3,7 +3,6 @@ var crypto = require('./crypto')
|
|||
var ecdsa = require('./ecdsa')
|
||||
var networks = require('./networks')
|
||||
|
||||
var Address = require('./address')
|
||||
var BigInteger = require('bigi')
|
||||
var ECPubKey = require('./ecpubkey')
|
||||
var ECSignature = require('./ecsignature')
|
||||
|
@ -38,10 +37,6 @@ function verify(address, signature, message, network) {
|
|||
signature = new Buffer(signature, 'base64')
|
||||
}
|
||||
|
||||
if (address instanceof Address) {
|
||||
address = address.toString()
|
||||
}
|
||||
|
||||
network = network || networks.bitcoin
|
||||
|
||||
var hash = magicHash(message, network)
|
||||
|
@ -50,7 +45,7 @@ function verify(address, signature, message, network) {
|
|||
var Q = ecdsa.recoverPubKey(ecparams, e, parsed.signature, parsed.i)
|
||||
|
||||
var pubKey = new ECPubKey(Q, parsed.compressed)
|
||||
return pubKey.getAddress(network).toString() === address
|
||||
return pubKey.getAddress(network).toString() === address.toString()
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
Loading…
Add table
Reference in a new issue