Merge pull request #120 from maraoz/feature/ux-fixes

Feature/ux fixes
This commit is contained in:
Ryan X. Charles 2014-04-21 13:16:57 -03:00
commit ace128dfe9
7 changed files with 39 additions and 37 deletions

View file

@ -19,6 +19,9 @@ console.log('[signin.js.23:walletId:]',walletId); //TODO
};
$scope.join = function(secret) {
if (!secret || !secret.length) {
return;
}
$scope.loading = true;
walletFactory.network.on('joinError', function() {

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);
};