diff --git a/src/js/controllers/buyBitcoindotcom.js b/src/js/controllers/buyBitcoindotcom.js index 741898c34..64766eede 100644 --- a/src/js/controllers/buyBitcoindotcom.js +++ b/src/js/controllers/buyBitcoindotcom.js @@ -1,7 +1,9 @@ 'use strict'; angular.module('copayApp.controllers').controller('buyBitcoindotcomController', - function($scope, $timeout, $ionicModal, $log, $state, $ionicHistory, lodash, bitcoincomService, externalLinkService, popupService) { + function($scope, platformInfo, externalLinkService) { + + $scope.os = platformInfo.isAndroid ? 'android' : platformInfo.isIOS ? 'ios' : 'desktop'; $scope.openExternalLink = function(url) { externalLinkService.open(url); diff --git a/src/js/services/bitcoincomService.js b/src/js/services/bitcoincomService.js index 681ed8f4d..051123111 100644 --- a/src/js/services/bitcoincomService.js +++ b/src/js/services/bitcoincomService.js @@ -1,12 +1,13 @@ 'use strict'; -angular.module('copayApp.services').factory('bitcoincomService', function($http, $log, lodash, moment, storageService, configService, platformInfo, nextStepsService, homeIntegrationsService) { +angular.module('copayApp.services').factory('bitcoincomService', function(platformInfo, nextStepsService) { var root = {}; var credentials = {}; /* * Development: 'testnet' * Production: 'livenet' - */ + */ + var os = platformInfo.isAndroid ? 'android' : platformInfo.isIOS ? 'ios' : 'desktop'; credentials.NETWORK = 'livenet'; //credentials.NETWORK = 'testnet'; @@ -20,28 +21,28 @@ angular.module('copayApp.services').factory('bitcoincomService', function($http, name: 'games', title: 'Bitcoin Cash Games', icon: 'icon-games', - href: 'http://cashgames.bitcoin.com' + href: 'https://cashgames.bitcoin.com' }; var newsItem = { name: 'news', title: 'News', icon: 'icon-news', - href: 'http://news.bitcoin.com' + href: 'https://news.bitcoin.com/?utm_source=WalletApp&utm_medium=' + os + '&utm_campaign=News' }; var poolItem = { name: 'pool', title: 'Mining Pool', icon: 'icon-mining', - href: 'http://pool.bitcoin.com' + href: 'https://pool.bitcoin.com/?utm_source=WalletApp&utm_medium=' + os + '&utm_campaign=Pool' }; var toolsItem = { name: 'tools', title: 'Tools', icon: 'icon-tools', - href: 'http://tools.bitcoin.com' + href: 'https://tools.bitcoin.com/?utm_source=WalletApp&utm_medium=' + os + '&utm_campaign=Tools' }; var priceChartItem = { @@ -55,7 +56,7 @@ angular.module('copayApp.services').factory('bitcoincomService', function($http, name: 'faucet', title: 'Free Bitcoin Cash', icon: 'icon-faucet', - href: 'https://free.bitcoin.com/' + href: 'https://free.bitcoin.com/?utm_source=WalletApp&utm_medium=' + os + '&utm_campaign=Faucet' }; var _getBitPay = function(endpoint) { diff --git a/www/views/buyBitcoindotcom.html b/www/views/buyBitcoindotcom.html index 2c8ef36f1..f0f8e27e3 100644 --- a/www/views/buyBitcoindotcom.html +++ b/www/views/buyBitcoindotcom.html @@ -15,7 +15,7 @@