Fix error for old browsers
This commit is contained in:
parent
5d3a74246a
commit
3247934953
3 changed files with 15 additions and 3 deletions
|
|
@ -35,10 +35,14 @@ angular.module('copayApp.controllers').controller('buyCoinbaseController', funct
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
$scope.isFiat = data.stateParams.currency ? true : false;
|
$scope.isFiat = data.stateParams.currency ? true : false;
|
||||||
[amount, currency, $scope.amountUnitStr] = coinbaseService.parseAmount(
|
var parsedAmount = coinbaseService.parseAmount(
|
||||||
data.stateParams.amount,
|
data.stateParams.amount,
|
||||||
data.stateParams.currency);
|
data.stateParams.currency);
|
||||||
|
|
||||||
|
amount = parsedAmount.amount;
|
||||||
|
currency = parsedAmount.currency;
|
||||||
|
$scope.amountUnitStr = parsedAmount.amountUnitStr;
|
||||||
|
|
||||||
$scope.network = coinbaseService.getNetwork();
|
$scope.network = coinbaseService.getNetwork();
|
||||||
$scope.wallets = profileService.getWallets({
|
$scope.wallets = profileService.getWallets({
|
||||||
onlyComplete: true,
|
onlyComplete: true,
|
||||||
|
|
|
||||||
|
|
@ -118,10 +118,14 @@ angular.module('copayApp.controllers').controller('sellCoinbaseController', func
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
$scope.isFiat = data.stateParams.currency ? true : false;
|
$scope.isFiat = data.stateParams.currency ? true : false;
|
||||||
[amount, currency, $scope.amountUnitStr] = coinbaseService.parseAmount(
|
var parsedAmount = coinbaseService.parseAmount(
|
||||||
data.stateParams.amount,
|
data.stateParams.amount,
|
||||||
data.stateParams.currency);
|
data.stateParams.currency);
|
||||||
|
|
||||||
|
amount = parsedAmount.amount;
|
||||||
|
currency = parsedAmount.currency;
|
||||||
|
$scope.amountUnitStr = parsedAmount.amountUnitStr;
|
||||||
|
|
||||||
$scope.priceSensitivity = coinbaseService.priceSensitivity;
|
$scope.priceSensitivity = coinbaseService.priceSensitivity;
|
||||||
$scope.selectedPriceSensitivity = { data: coinbaseService.selectedPriceSensitivity };
|
$scope.selectedPriceSensitivity = { data: coinbaseService.selectedPriceSensitivity };
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,11 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $
|
||||||
currency = 'BTC';
|
currency = 'BTC';
|
||||||
}
|
}
|
||||||
|
|
||||||
return [amount, currency, amountUnitStr];
|
return {
|
||||||
|
amount: amount,
|
||||||
|
currency: currency,
|
||||||
|
amountUnitStr: amountUnitStr
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
root.getSignupUrl = function() {
|
root.getSignupUrl = function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue