Merge pull request #5421 from ajp8164/feat/bitpay-accounts

Improved bitpay account pairing and management of paired state and data.
This commit is contained in:
Gustavo Maximiliano Cortez 2017-02-22 12:40:36 -03:00 committed by GitHub
commit bb744f1e05
23 changed files with 652 additions and 209 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);
};
}
};
});