From ec354bd340414dda1f7271dfe0492a2946cc7a6d Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 6 Aug 2018 11:25:29 +0200 Subject: [PATCH] header css --- src/js/controllers/review.controller.js | 4 ++++ src/js/services/shapeshiftService.js | 19 +++++++++++++------ src/sass/views/shapeshift.scss | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 5c05ea6fa..c2e6be3de 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -105,6 +105,10 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } vm.approve = function() { + if (vm.thirdParty.id === 'shapeshift') { + shapeshiftService.shiftIt(); + return; + } if (!tx || !vm.originWallet) return; diff --git a/src/js/services/shapeshiftService.js b/src/js/services/shapeshiftService.js index 131df0cd0..317e72394 100644 --- a/src/js/services/shapeshiftService.js +++ b/src/js/services/shapeshiftService.js @@ -1,26 +1,32 @@ 'use strict'; -angular.module('copayApp.services').factory('shapeshiftService', function($http, $log, lodash, moment, ongoingProcess, shapeshiftApiService, storageService, configService, platformInfo, servicesService) { +angular.module('copayApp.services').factory('shapeshiftService', function($http, $interval, $log, lodash, moment, ongoingProcess, shapeshiftApiService, storageService, configService, incomingData, platformInfo, servicesService) { var root = {}; root.ShiftState = 'Shift'; root.withdrawalAddress = '' root.returnAddress = '' root.amount = ''; root.marketData = {} - this.withdrawalAddress = function(address) { + root.withdrawalAddress = function(address) { root.withdrawalAddress = address; }; - this.returnAddress = function(address) { + root.returnAddress = function(address) { root.returnAddress = address; }; - this.amount = function(amount) { + root.amount = function(amount) { root.amount = amount; }; - this.fromWalletId = function(id) { + root.fromWalletId = function(id) { root.fromWalletId = id; }; - this.toWalletId = function(id) { + root.toWalletId = function(id) { root.toWalletId = id; }; + 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); @@ -104,6 +110,7 @@ angular.module('copayApp.services').factory('shapeshiftService', function($http, var shapeshiftData = { fromWalletId: root.fromWalletId, + toWalletId: root.toWalletId, minAmount: root.marketData.minimum, maxAmount: root.marketData.maxLimit, orderId: root.depositInfo.orderId diff --git a/src/sass/views/shapeshift.scss b/src/sass/views/shapeshift.scss index ee4cd0b0f..5b63c0354 100644 --- a/src/sass/views/shapeshift.scss +++ b/src/sass/views/shapeshift.scss @@ -18,6 +18,6 @@ } } .header.shapeshift { - background: url(../img/shapeshiftbg.jpg) center center no-repeat #28394d; + background: url(../img/shapeshiftbg.jpg) center center repeat #28394d; opacity: 0.99; } \ No newline at end of file