Refactored sendFlowService and cleared its state before entering the send tab.

This commit is contained in:
Brendon Duncan 2018-08-09 11:10:26 +12:00
commit dff0d51ef3
11 changed files with 125 additions and 49 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('shapeshiftController', function($scope, $state, $timeout, $ionicHistory, profileService, walletService, popupService, lodash, $ionicNavBarDelegate) {
angular.module('copayApp.controllers').controller('shapeshiftController', function($scope, sendFlowService, $state, $timeout, $ionicHistory, profileService, walletService, popupService, lodash, $ionicNavBarDelegate) {
var walletsBtc = [];
var walletsBch = [];
@ -67,6 +67,7 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi
thirdParty: JSON.stringify({id: 'shapeshift'})
};
sendFlowService.clear();
$state.go('tabs.home').then(function() {
$ionicHistory.clearHistory();
$state.go('tabs.send').then(function() {