Show wallets with sufficient funds in order to top-up the bitpay card. Improves error messages

This commit is contained in:
Gustavo Maximiliano Cortez 2017-03-20 14:53:18 -03:00
commit 7c14c613ad
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
4 changed files with 41 additions and 18 deletions

View file

@ -762,6 +762,18 @@ angular.module('copayApp.services')
});
}
if (opts.hasFunds) {
ret = lodash.filter(ret, function(w) {
return (w.status.availableBalanceSat > 0);
});
}
if (opts.minAmount) {
ret = lodash.filter(ret, function(w) {
return (w.status.availableBalanceSat > opts.minAmount);
});
}
if (opts.onlyComplete) {
ret = lodash.filter(ret, function(w) {
return w.isComplete();