-
diff --git a/js/filters.js b/js/filters.js
index 5c685f61c..258d22610 100644
--- a/js/filters.js
+++ b/js/filters.js
@@ -24,4 +24,44 @@ angular.module('copay.filters', [])
return function(elements) {
return elements.filter(Boolean);
};
- });
+ })
+ .filter('limitAddress', function() {
+ return function(elements, showAll) {
+ var addrs = [];
+ if (elements.length > 0) {
+ if (showAll) {
+ return elements;
+ }
+ if (elements.length == 1) {
+ return elements;
+ }
+ else {
+ for (var i=0;i 0) {
+ addrs.push(elements[i]);
+ }
+ }
+ return addrs;
+ }
+ }
+ };
+ })
+ .filter('withoutFunds', function() {
+ return function(elements) {
+ var len = 0;
+ for (var i=0;i