The isWallet param is not always specified and needs to be set to a default value before parse from string.

This commit is contained in:
Andy Phillipson 2016-12-16 17:43:14 -05:00
commit 948297a9f6
2 changed files with 4 additions and 2 deletions

View file

@ -22,7 +22,8 @@ angular.module('copayApp.controllers').controller('amountController', function($
$scope.cardId = data.stateParams.cardId;
$scope.showMenu = $ionicHistory.backView().stateName == 'tabs.send';
$scope.isWallet = (data.stateParams.isWallet.trim().toLowerCase() == 'true' ? true : false);
var isWallet = data.stateParams.isWallet || 'false';
$scope.isWallet = (isWallet.toString().trim().toLowerCase() == 'true' ? true : false);
$scope.toAddress = data.stateParams.toAddress;
$scope.toName = data.stateParams.toName;
$scope.toEmail = data.stateParams.toEmail;

View file

@ -28,7 +28,8 @@ 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.trim().toLowerCase() == 'true' ? true : false);
var isWallet = data.stateParams.isWallet || 'false';
$scope.isWallet = (isWallet.toString().trim().toLowerCase() == 'true' ? true : false);
$scope.cardId = data.stateParams.cardId;
$scope.toAddress = data.stateParams.toAddress;
$scope.toName = data.stateParams.toName;