Browse Source

Removes pointless error utility function

hk-custom-address
Daniel Cousens 11 years ago
parent
commit
a4c2cc6dd4
  1. 3
      src/address.js
  2. 4
      src/util.js

3
src/address.js

@ -1,7 +1,6 @@
var base58 = require('./base58')
var base58check = require('./base58check')
var convert = require('./convert')
var error = require('./util').error
var mainnet = require('./network').mainnet.addressVersion
function Address(bytes, version) {
@ -25,7 +24,7 @@ function Address(bytes, version) {
this.version = version || mainnet
}
else {
error('invalid or unrecognized input')
throw new Error('Invalid or unrecognized input')
}
}
else {

4
src/util.js

@ -7,7 +7,3 @@ exports.sha256ripe160 = function (data) {
var wordArray = RIPEMD160(SHA256(convert.bytesToWordArray(data)))
return convert.wordArrayToBytes(wordArray)
}
exports.error = function (msg) {
throw new Error(msg)
}

Loading…
Cancel
Save