Fix error for old browsers

This commit is contained in:
Gustavo Maximiliano Cortez 2017-02-06 16:03:32 -03:00
commit 3247934953
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
3 changed files with 15 additions and 3 deletions

View file

@ -35,10 +35,14 @@ angular.module('copayApp.controllers').controller('buyCoinbaseController', funct
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.isFiat = data.stateParams.currency ? true : false;
[amount, currency, $scope.amountUnitStr] = coinbaseService.parseAmount(
var parsedAmount = coinbaseService.parseAmount(
data.stateParams.amount,
data.stateParams.currency);
amount = parsedAmount.amount;
currency = parsedAmount.currency;
$scope.amountUnitStr = parsedAmount.amountUnitStr;
$scope.network = coinbaseService.getNetwork();
$scope.wallets = profileService.getWallets({
onlyComplete: true,

View file

@ -118,10 +118,14 @@ angular.module('copayApp.controllers').controller('sellCoinbaseController', func
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.isFiat = data.stateParams.currency ? true : false;
[amount, currency, $scope.amountUnitStr] = coinbaseService.parseAmount(
var parsedAmount = coinbaseService.parseAmount(
data.stateParams.amount,
data.stateParams.currency);
amount = parsedAmount.amount;
currency = parsedAmount.currency;
$scope.amountUnitStr = parsedAmount.amountUnitStr;
$scope.priceSensitivity = coinbaseService.priceSensitivity;
$scope.selectedPriceSensitivity = { data: coinbaseService.selectedPriceSensitivity };

View file

@ -124,7 +124,11 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $
currency = 'BTC';
}
return [amount, currency, amountUnitStr];
return {
amount: amount,
currency: currency,
amountUnitStr: amountUnitStr
};
};
root.getSignupUrl = function() {