diff --git a/src/js/controllers/buyandsellController.js b/src/js/controllers/buyandsellController.js index 643ba401a..685ace2c6 100644 --- a/src/js/controllers/buyandsellController.js +++ b/src/js/controllers/buyandsellController.js @@ -5,6 +5,21 @@ angular.module('copayApp.controllers').controller('buyandsellController', functi $scope.$on("$ionicView.beforeEnter", function(event, data) { $scope.services = buyAndSellService.get(); + $scope.$on("$ionicView.enter", function(event, data) { + console.log("Enter buy page"); + var r = new XMLHttpRequest(); + r.open("GET", "https://www.bitcoin.com/api/rv/promoted-exchange", true); + r.onreadystatechange = function () { + if (r.readyState != 4 || r.status != 200) return; + console.log(r.responseText); + var adResponse = JSON.parse(r.responseText) + document.getElementById("exchange-logo").setAttribute('src', "https://www.bitcoin.com" + adResponse.image) + document.getElementById("exchange-name").textContent = adResponse.bannerName; + document.getElementById("exchange-text").textContent = adResponse.description; + }; + r.send("defaultpromotion=360"); + }); + if (lodash.isEmpty($scope.services)) $ionicHistory.goBack(); }); diff --git a/www/views/buyandsell.html b/www/views/buyandsell.html index 629e28568..a7c808c09 100644 --- a/www/views/buyandsell.html +++ b/www/views/buyandsell.html @@ -2,24 +2,21 @@ - Buy or Sell Bitcoin + Buy Bitcoin
- - - -
Connect an Exchange
-
Buy or sell bitcoin directly from your wallet by connecting your exchange accounts.
+
Choose an Exchange
+
We recommend the following exchange:
+
+
+ +

+

+
-
-
- - {{service.location}} - -
diff --git a/www/views/includes/buyAndSellCard.html b/www/views/includes/buyAndSellCard.html index a736b77fa..240aa289a 100644 --- a/www/views/includes/buyAndSellCard.html +++ b/www/views/includes/buyAndSellCard.html @@ -1,7 +1,7 @@
- Buy & Sell Bitcoin + Buy bitcoin
diff --git a/www/views/onboarding/welcome.html b/www/views/onboarding/welcome.html index 669efdbfb..bab6f40ea 100644 --- a/www/views/onboarding/welcome.html +++ b/www/views/onboarding/welcome.html @@ -1,7 +1,7 @@
- +

Take control of your money,
get started with bitcoin.

diff --git a/www/views/tab-home.html b/www/views/tab-home.html index 5f393236e..21d81ce80 100644 --- a/www/views/tab-home.html +++ b/www/views/tab-home.html @@ -1,6 +1,6 @@ - +