improving UI and wording for signing page

This commit is contained in:
Manuel Araoz 2014-04-21 12:10:34 -03:00
commit 9779d5f6df
7 changed files with 28 additions and 27 deletions

View file

@ -23,7 +23,8 @@ PrivateKey.prototype.getId = function(prefix) {
if (prefix) {
buf = Buffer.concat([prefix, buf]);
}
return util.ripe160(buf).toString('hex');
var hash = util.sha256(buf).toString('hex');
return hash.substring(0, hash.length/2);
};

View file

@ -82,7 +82,8 @@ PublicKeyRing.prototype.getCopayerId = function(i, prefix) {
if (prefix) {
buf = Buffer.concat([prefix, buf]);
}
return util.ripe160(buf).toString('hex');
var hash = util.sha256(buf).toString('hex');
return hash.substring(0, hash.length/2);
};
PublicKeyRing.prototype.myCopayerId = function(i, prefix) {

View file

@ -144,17 +144,7 @@ Wallet.prototype._optsToObj = function () {
Wallet.prototype.getPeerId = function(index) {
// if (typeof index === 'undefined') {
// // return my own peerId
// var gen = this.privateKey.getId(idBuf);
// return gen;
// }
// return peer number 'index' peerId
//
var idBuf;
// TODO idBuf DISABLED FOR NOW
//idBuf = new Buffer(this.id);
return this.publicKeyRing.getCopayerId(index || 0, idBuf);
return this.publicKeyRing.getCopayerId(index || 0);
};