From 4b6be720a737d31fb55b7eac14dff1bea0232568 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 12 Jan 2017 23:53:23 -0300 Subject: [PATCH] Refactor sell --- src/js/controllers/sellCoinbase.js | 8 +++----- www/views/sellCoinbase.html | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/js/controllers/sellCoinbase.js b/src/js/controllers/sellCoinbase.js index b7d2dc4aa..c90c48ce6 100644 --- a/src/js/controllers/sellCoinbase.js +++ b/src/js/controllers/sellCoinbase.js @@ -173,13 +173,12 @@ angular.module('copayApp.controllers').controller('sellCoinbaseController', func return; } if (!hasPrimary) $scope.selectedPaymentMethodId.value = $scope.paymentMethods[0].id; - $scope.sellRequest({ quote: true }); + $scope.sellRequest(); }); }); }); - $scope.sellRequest = function(opts) { - opts = opts || {}; + $scope.sellRequest = function() { ongoingProcess.set('connectingCoinbase', true); coinbaseService.init(function(err, res) { if (err) { @@ -193,8 +192,7 @@ angular.module('copayApp.controllers').controller('sellCoinbaseController', func amount: amount, currency: currency, payment_method: $scope.selectedPaymentMethodId.value, - commit: opts.commit, - quote: opts.quote + quote: true }; coinbaseService.sellRequest(accessToken, accountId, dataSrc, function(err, data) { ongoingProcess.set('connectingCoinbase', false); diff --git a/www/views/sellCoinbase.html b/www/views/sellCoinbase.html index 2fcc8d771..b74b8783f 100644 --- a/www/views/sellCoinbase.html +++ b/www/views/sellCoinbase.html @@ -17,7 +17,7 @@