Improved bitpay account pairing and management of paired state and data.

This commit is contained in:
Andy Phillipson 2017-01-06 12:11:47 -05:00
commit 63bc3d8f63
23 changed files with 691 additions and 208 deletions

View file

@ -0,0 +1,28 @@
'use strict';
angular.module('copayApp.directives')
.directive('accountSelector', function($timeout) {
return {
restrict: 'E',
templateUrl: 'views/includes/accountSelector.html',
transclude: true,
scope: {
title: '=accountSelectorTitle',
show: '=accountSelectorShow',
accounts: '=accountSelectorAccounts',
selectedAccount: '=accountSelectorSelectedAccount',
onSelect: '=accountSelectorOnSelect'
},
link: function(scope, element, attrs) {
scope.hide = function() {
scope.show = false;
};
scope.selectAccount = function(account) {
$timeout(function() {
scope.hide();
}, 100);
scope.onSelect(account);
};
}
};
});