use contact icon - fix text size - refactor recipient icon type

This commit is contained in:
JDonadio 2017-02-20 13:06:42 -05:00
commit 428a842459
9 changed files with 32 additions and 28 deletions

View file

@ -23,8 +23,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
$scope.forceCurrency = data.stateParams.forceCurrency;
$scope.showMenu = $ionicHistory.backView() && $ionicHistory.backView().stateName == 'tabs.send';
var isWallet = data.stateParams.isWallet || 'false';
$scope.isWallet = (isWallet.toString().trim().toLowerCase() == 'true' ? true : false);
$scope.recipientType = data.stateParams.recipientType || null;
$scope.toAddress = data.stateParams.toAddress;
$scope.toName = data.stateParams.toName;
$scope.toEmail = data.stateParams.toEmail;
@ -95,7 +94,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
$scope.sendMax = function() {
$scope.showSendMax = false;
$state.transitionTo('tabs.send.confirm', {
isWallet: $scope.isWallet,
recipientType: $scope.recipientType,
toAmount: null,
toAddress: $scope.toAddress,
toName: $scope.toName,
@ -234,7 +233,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
});
} else {
$state.transitionTo('tabs.send.confirm', {
isWallet: $scope.isWallet,
recipientType: $scope.recipientType,
toAmount: (amount * unitToSatoshi).toFixed(0),
toAddress: $scope.toAddress,
toName: $scope.toName,

View file

@ -14,7 +14,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
toAmount = data.stateParams.toAmount;
cachedSendMax = {};
$scope.useSendMax = data.stateParams.useSendMax == 'true' ? true : false;
$scope.isWallet = data.stateParams.isWallet == 'true' ? true : false;
$scope.recipientType = data.stateParams.recipientType || null;
$scope.toAddress = data.stateParams.toAddress;
$scope.toName = data.stateParams.toName;
$scope.toEmail = data.stateParams.toEmail;

View file

@ -23,7 +23,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
originalList.push({
color: v.color,
name: v.name,
isWallet: true,
recipientType: 'wallet',
getAddress: function(cb) {
walletService.getAddress(v, false, cb);
},
@ -41,6 +41,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
name: lodash.isObject(v) ? v.name : v,
address: k,
email: lodash.isObject(v) ? v.email : null,
recipientType: 'contact',
getAddress: function(cb) {
return cb(null, k);
},
@ -99,7 +100,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
}
$log.debug('Got toAddress:' + addr + ' | ' + item.name);
return $state.transitionTo('tabs.send.amount', {
isWallet: item.isWallet,
recipientType: item.recipientType,
toAddress: addr,
toName: item.name,
toEmail: item.email,
@ -142,7 +143,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
$log.error(err);
// error updating the wallet. Probably a network error, do not show
// the 'buy bitcoins' message.
$scope.hasFunds = true;
} else if (status.availableBalanceSat > 0) {
$scope.hasFunds = true;