switch between wallets in profile working

This commit is contained in:
Matias Alejo Garcia 2014-10-05 15:59:41 -03:00
commit ac491d10b0
19 changed files with 293 additions and 179 deletions

View file

@ -111,14 +111,13 @@ angular.module('copayApp.directives')
};
}
])
.directive('walletSecret', ['walletFactory',
function(walletFactory) {
.directive('walletSecret', function() {
return {
require: 'ngModel',
link: function(scope, elem, attrs, ctrl) {
var validator = function(value) {
var a = new Address(value);
ctrl.$setValidity('walletSecret', !a.isValid() && Boolean(walletFactory.decodeSecret(value)));
ctrl.$setValidity('walletSecret', !a.isValid() && Boolean(copay.Wallet.decodeSecret(value)));
return value;
};
@ -126,7 +125,7 @@ angular.module('copayApp.directives')
}
};
}
])
)
.directive('loading', function() {
return {
restrict: 'A',