show alias in sending to contact

This commit is contained in:
Kadir Sekha 2017-11-02 12:55:55 +09:00
commit 31564d6fc5

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('tabSendController', function($scope, $rootScope, $log, $timeout, $ionicScrollDelegate, addressbookService, profileService, lodash, $state, walletService, incomingData, popupService, platformInfo, bwcError, gettextCatalog, scannerService, bitcoreCash) { angular.module('copayApp.controllers').controller('tabSendController', function($scope, $rootScope, $log, $timeout, $ionicScrollDelegate, addressbookService, profileService, lodash, $state, walletService, incomingData, popupService, platformInfo, bwcError, gettextCatalog, scannerService, bitcoreCash, configService) {
var originalList; var originalList;
var CONTACTS_SHOW_LIMIT; var CONTACTS_SHOW_LIMIT;
@ -97,6 +97,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
}; };
var updateContactsList = function(cb) { var updateContactsList = function(cb) {
var defaults = configService.getDefaults();
addressbookService.list(function(err, ab) { addressbookService.list(function(err, ab) {
if (err) $log.error(err); if (err) $log.error(err);
@ -112,7 +113,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
email: lodash.isObject(v) ? v.email : null, email: lodash.isObject(v) ? v.email : null,
recipientType: 'contact', recipientType: 'contact',
coin: c, coin: c,
displayCoin: c.toUpperCase(), displayCoin: (c == 'bch' ? defaults.bitcoinCashAlias : defaults.bitcoinAlias).toUpperCase(),
getAddress: function(cb) { getAddress: function(cb) {
return cb(null, k); return cb(null, k);
}, },