Comparing version 1.0.6 to 1.0.7
@@ -252,3 +252,3 @@ var CryptoJS = require('crypto-js') | ||
// sign the transaction | ||
var signature = secp256k1.sign(new Buffer(tx.hash, 'hex'), bs58.decode(privKey)) | ||
var signature = secp256k1.sign(Buffer.from(tx.hash, 'hex'), bs58.decode(privKey)) | ||
tx.signature = bs58.encode(signature.signature) | ||
@@ -331,3 +331,4 @@ return tx | ||
var nodes = avalon.config.api | ||
return nodes[Math.floor(Math.random()*nodes.length)] | ||
if (typeof nodes === 'string') return nodes | ||
else return nodes[Math.floor(Math.random()*nodes.length)] | ||
}, | ||
@@ -334,0 +335,0 @@ votingPower: (account) => { |
{ | ||
"name": "javalon", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "javascript api for the avalon blockchain", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
18105
405