Fix Conflicts:

css/main.css
This commit is contained in:
Gustavo Cortez 2014-05-15 02:16:55 -03:00
commit 82abcb8036
13 changed files with 177 additions and 63 deletions

View file

@ -64,6 +64,21 @@ angular.module('copay.directives')
};
}
])
.directive('walletSecret', ['walletFactory',
function(walletFactory) {
return {
require: 'ngModel',
link: function(scope, elem, attrs, ctrl) {
var validator = function(value) {
ctrl.$setValidity('walletSecret', Boolean(walletFactory.decodeSecret(value)));
return value;
};
ctrl.$parsers.unshift(validator);
}
};
}
])
.directive('loading', function() {
return {
restrict: 'A',

View file

@ -162,16 +162,20 @@ WalletFactory.prototype.remove = function(walletId) {
this.log('TODO: remove wallet contents');
};
WalletFactory.prototype.decodeSecret = function(secret) {
try {
return Wallet.decodeSecret(secret);
} catch (e) {
return false;
}
}
WalletFactory.prototype.joinCreateSession = function(secret, nickname, passphrase, cb) {
var self = this;
var s;
try {
s=Wallet.decodeSecret(secret);
} catch (e) {
return cb('badSecret');
}
var s = self.decodeSecret(secret);
if (!s) return cb('badSecret');
//Create our PrivateK
var privateKey = new PrivateKey({ networkName: this.networkName });

View file

@ -74,4 +74,7 @@ angular
}
}
});
})
.config(function($compileProvider) {
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|tel|chrome-extension):/);
});