From 415b79c12e209ad99228b5c9b2d2cb80a93da9b0 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Mon, 16 Jul 2018 14:20:40 +0900 Subject: [PATCH] 474 - Fix os in the link --- src/js/services/bitcoincomService.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/js/services/bitcoincomService.js b/src/js/services/bitcoincomService.js index d7883b68e..b404031b1 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: 'https://cashgames.bitcoin.com/?utm_source=WalletApp&utm_medium=iOS&utm_campaign=CashGames' + href: 'https://cashgames.bitcoin.com/?utm_source=WalletApp&utm_medium=' + os + '&utm_campaign=CashGames' }; var newsItem = { name: 'news', title: 'News', icon: 'icon-news', - href: 'https://news.bitcoin.com/?utm_source=WalletApp&utm_medium=iOS&utm_campaign=News' + 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: 'https://pool.bitcoin.com/?utm_source=WalletApp&utm_medium=iOS&utm_campaign=Pool' + href: 'https://pool.bitcoin.com/?utm_source=WalletApp&utm_medium=' + os + '&utm_campaign=Pool' }; var toolsItem = { name: 'tools', title: 'Tools', icon: 'icon-tools', - href: 'https://tools.bitcoin.com/?utm_source=WalletApp&utm_medium=iOS&utm_campaign=Tools' + 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/?utm_source=WalletApp&utm_medium=iOS&utm_campaign=Faucet' + href: 'https://free.bitcoin.com/?utm_source=WalletApp&utm_medium=' + os + '&utm_campaign=Faucet' }; var _getBitPay = function(endpoint) {