Fix tab-send

This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-12 18:04:56 -03:00
commit 9a7e274485
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
2 changed files with 6 additions and 6 deletions

View file

@ -25,7 +25,7 @@
<a class="item item-icon-left" ng-repeat="item in list" ng-click="goToAmount(item)"> <a class="item item-icon-left" ng-repeat="item in list" ng-click="goToAmount(item)">
<i ng-show="item.isWallet" class="icon ion-briefcase size-21" ng-style="{'color':item.color}"></i> <i ng-show="item.isWallet" class="icon ion-briefcase size-21" ng-style="{'color':item.color}"></i>
<i ng-show="!item.isWallet" class="icon ion-ios-person-outline"></i> <i ng-show="!item.isWallet" class="icon ion-ios-person-outline"></i>
{{item.label}} {{item.name}}
</a> </a>
</div> </div>
</ion-content> </ion-content>

View file

@ -14,7 +14,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
lodash.each(wallets, function(v) { lodash.each(wallets, function(v) {
originalList.push({ originalList.push({
color: v.color, color: v.color,
label: v.name, name: v.name,
isWallet: true, isWallet: true,
getAddress: function(cb) { getAddress: function(cb) {
walletService.getAddress(v, false, cb); walletService.getAddress(v, false, cb);
@ -28,7 +28,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
var contacts = []; var contacts = [];
lodash.each(ab, function(v, k) { lodash.each(ab, function(v, k) {
contacts.push({ contacts.push({
label: v, name: lodash.isObject(v) ? v.name : v,
address: k, address: k,
getAddress: function(cb) { getAddress: function(cb) {
return cb(null, k); return cb(null, k);
@ -60,7 +60,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
} }
var result = lodash.filter(originalList, function(item) { var result = lodash.filter(originalList, function(item) {
var val = item.label || item.alias || item.name; var val = item.name;
return lodash.includes(val.toLowerCase(), search.toLowerCase()); return lodash.includes(val.toLowerCase(), search.toLowerCase());
}); });
@ -73,10 +73,10 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
$log.error(err); $log.error(err);
return; return;
} }
$log.debug('Got toAddress:' + addr + ' | ' + item.label); $log.debug('Got toAddress:' + addr + ' | ' + item.name);
return $state.transitionTo('send.amount', { return $state.transitionTo('send.amount', {
toAddress: addr, toAddress: addr,
toName: item.label toName: item.name
}) })
}); });
}; };