Skip to content

Commit 9f57adf

Browse files
committed
dont include tokens with 0 balances in sendable list
1 parent 43db44c commit 9f57adf

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/js/controllers/walletHome.js

+19-19
Original file line numberDiff line numberDiff line change
@@ -324,25 +324,25 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
324324
}
325325
var listBvam = $scope.index.bvamData;
326326
lodash.each($scope.index.tokenBalances, function(token) {
327-
var label = token.tokenName;
328-
var bvam = {};
329-
if (typeof listBvam[token.tokenName] == 'undefined') {
330-
return false;
331-
}
332-
333-
bvam = listBvam[token.tokenName];
334-
if (bvam.short_name || bvam.name) {
335-
if (bvam.short_name) {
336-
label = bvam.short_name;
337-
}
338-
else {
339-
label = bvam.name;
340-
}
341-
if (token.tokenName != label) {
342-
label = label + ' (' + token.tokenName + ')';
343-
}
344-
}
345-
sendableTokens[token.tokenName] = label;
327+
if(token.quantitySat > 0){
328+
var label = token.tokenName;
329+
var bvam = {};
330+
if (typeof listBvam[token.tokenName] != 'undefined') {
331+
bvam = listBvam[token.tokenName];
332+
if (bvam.short_name || bvam.name) {
333+
if (bvam.short_name) {
334+
label = bvam.short_name;
335+
}
336+
else {
337+
label = bvam.name;
338+
}
339+
if (token.tokenName != label) {
340+
label = label + ' (' + token.tokenName + ')';
341+
}
342+
}
343+
}
344+
sendableTokens[token.tokenName] = label;
345+
}
346346
});
347347

348348
return sendableTokens;

0 commit comments

Comments
 (0)