From 83b1977a6f93922b9ee67730c1559fae6ed67b02 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Tue, 7 Aug 2018 09:47:37 +0200 Subject: [PATCH] Shapeshift controller useless functions removed --- src/js/services/shapeshiftService.js | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/src/js/services/shapeshiftService.js b/src/js/services/shapeshiftService.js index b3e307667..329cadbb3 100644 --- a/src/js/services/shapeshiftService.js +++ b/src/js/services/shapeshiftService.js @@ -8,21 +8,6 @@ angular.module('copayApp.services').factory('shapeshiftService', function ($http root.returnAddress = ''; root.amount = ''; root.marketData = {}; - root.withdrawalAddress = function (address) { - root.withdrawalAddress = address; - }; - root.returnAddress = function (address) { - root.returnAddress = address; - }; - root.amount = function (amount) { - root.amount = amount; - }; - root.coinIn = function (coinIn) { - root.coinIn = coinIn.toUpperCase(); - }; - root.coinOut = function (coinOut) { - root.coinOut = coinOut.toUpperCase(); - }; root.getMarketDataIn = function (coin) { if (coin === root.coinOut) return root.getMarketData(root.coinOut, root.coinIn); @@ -66,8 +51,10 @@ angular.module('copayApp.services').factory('shapeshiftService', function ($http root.shiftIt = function (coinIn, coinOut, withdrawalAddress, returnAddress, cb) { ongoingProcess.set('connectingShapeshift', true); - root.withdrawalAddress(withdrawalAddress); - root.returnAddress(returnAddress); + root.withdrawalAddress = withdrawalAddress; + root.returnAddress = returnAddress; + root.coinIn = coinIn; + root.coinOut = coinOut; var validate = shapeshiftApiService.ValidateAddress(withdrawalAddress, coinOut); validate.then(function (valid) { var tx = ShapeShift();