Browse Source

*: adhere to standard 3

hk-custom-address
Daniel Cousens 10 years ago
parent
commit
f64df79555
  1. 3
      src/scripts.js
  2. 3
      test/bitcoin.core.js
  3. 3
      test/integration/crypto.js

3
src/scripts.js

@ -14,8 +14,9 @@ function isCanonicalPubKey (buffer) {
try { try {
ecurve.Point.decodeFrom(curve, buffer) ecurve.Point.decodeFrom(curve, buffer)
} catch (e) { } catch (e) {
if (!(e.message.match(/Invalid sequence (length|tag)/))) if (!(e.message.match(/Invalid sequence (length|tag)/))) {
throw e throw e
}
return false return false
} }

3
test/bitcoin.core.js

@ -60,8 +60,9 @@ describe('Bitcoin-core', function () {
var network = networks.bitcoin var network = networks.bitcoin
if (params.isPrivkey) return if (params.isPrivkey) return
if (params.isTestnet) if (params.isTestnet) {
network = networks.testnet network = networks.testnet
}
it('can import ' + string, function () { it('can import ' + string, function () {
var address = Address.fromBase58Check(string) var address = Address.fromBase58Check(string)

3
test/integration/crypto.js

@ -150,8 +150,7 @@ describe('bitcoinjs-lib (crypto)', function () {
// finally, run the tasks, then on to the math // finally, run the tasks, then on to the math
async.parallel(tasks, function (err) { async.parallel(tasks, function (err) {
if (err) if (err) throw err
throw err
var n = bitcoin.ECPair.curve.n var n = bitcoin.ECPair.curve.n

Loading…
Cancel
Save