Added version to getBitcoinAddress

This commit is contained in:
Vitalik Buterin 2014-01-02 20:33:23 -05:00
parent 4abcdbd7af
commit 02a8db111b
2 changed files with 2 additions and 2 deletions

0
demo/split-key.html Executable file → Normal file
View file

View file

@ -64,9 +64,9 @@ ECKey.prototype.getPubKeyHash = function () {
return this.pubKeyHash = util.sha256ripe160(this.getPub()); return this.pubKeyHash = util.sha256ripe160(this.getPub());
}; };
ECKey.prototype.getBitcoinAddress = function () { ECKey.prototype.getBitcoinAddress = function (version) {
var hash = this.getPubKeyHash(); var hash = this.getPubKeyHash();
var addr = new Address(hash); var addr = new Address(hash,version);
return addr; return addr;
}; };