Merge pull request #215 from Bitcoin-com/wallet/task/474

474 - Link updated for Analytics
This commit is contained in:
Brendon Duncan 2018-07-17 10:36:46 +12:00 committed by GitHub
commit 9a0cfdbcfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 9 deletions

View file

@ -1,7 +1,9 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('buyBitcoindotcomController', 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) { $scope.openExternalLink = function(url) {
externalLinkService.open(url); externalLinkService.open(url);

View file

@ -1,5 +1,5 @@
'use strict'; '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 root = {};
var credentials = {}; var credentials = {};
@ -7,6 +7,7 @@ angular.module('copayApp.services').factory('bitcoincomService', function($http,
* Development: 'testnet' * Development: 'testnet'
* Production: 'livenet' * Production: 'livenet'
*/ */
var os = platformInfo.isAndroid ? 'android' : platformInfo.isIOS ? 'ios' : 'desktop';
credentials.NETWORK = 'livenet'; credentials.NETWORK = 'livenet';
//credentials.NETWORK = 'testnet'; //credentials.NETWORK = 'testnet';
@ -20,28 +21,28 @@ angular.module('copayApp.services').factory('bitcoincomService', function($http,
name: 'games', name: 'games',
title: 'Bitcoin Cash Games', title: 'Bitcoin Cash Games',
icon: 'icon-games', icon: 'icon-games',
href: 'http://cashgames.bitcoin.com' href: 'https://cashgames.bitcoin.com'
}; };
var newsItem = { var newsItem = {
name: 'news', name: 'news',
title: 'News', title: 'News',
icon: 'icon-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 = { var poolItem = {
name: 'pool', name: 'pool',
title: 'Mining Pool', title: 'Mining Pool',
icon: 'icon-mining', icon: 'icon-mining',
href: 'http://pool.bitcoin.com' href: 'https://pool.bitcoin.com/?utm_source=WalletApp&utm_medium=' + os + '&utm_campaign=Pool'
}; };
var toolsItem = { var toolsItem = {
name: 'tools', name: 'tools',
title: 'Tools', title: 'Tools',
icon: 'icon-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 = { var priceChartItem = {
@ -55,7 +56,7 @@ angular.module('copayApp.services').factory('bitcoincomService', function($http,
name: 'faucet', name: 'faucet',
title: 'Free Bitcoin Cash', title: 'Free Bitcoin Cash',
icon: 'icon-faucet', 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) { var _getBitPay = function(endpoint) {

View file

@ -15,7 +15,7 @@
</div> </div>
<div class="item item-divider"></div> <div class="item item-divider"></div>
<div class="bitcoin-com-page-body"> <div class="bitcoin-com-page-body">
<button class="button button-standard button-secondary" ng-click="openExternalLink('https://buy.bitcoin.com')">Buy bitcoin</button> <button class="button button-standard button-secondary" ng-click="openExternalLink('https://buy.bitcoin.com/?utm_source=WalletApp&utm_medium=' + os + '&utm_campaign=BuyBitcoin')">Buy bitcoin</button>
</div> </div>
</div> </div>
</ion-content> </ion-content>