Skip to content

Commit

Permalink
Merge pull request #364 from Bitcoin-com/wallet/task/546
Browse files Browse the repository at this point in the history
546 - Handle shapeshift error
  • Loading branch information
Jean-Baptiste Dominguez authored Sep 26, 2018
2 parents b0283ce + dd61e72 commit 464ed67
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/js/controllers/review.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ angular
.module('copayApp.controllers')
.controller('reviewController', reviewController);

function reviewController(addressbookService, bitcoinCashJsService, bitcore, bitcoreCash, bwcError, clipboardService, configService, feeService, gettextCatalog, $interval, $ionicHistory, $ionicModal, ionicToast, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, sendFlowService, shapeshiftService, soundService, $state, $timeout, txConfirmNotification, txFormatService, walletService) {
function reviewController(addressbookService, externalLinkService, bitcoinCashJsService, bitcore, bitcoreCash, bwcError, clipboardService, configService, feeService, gettextCatalog, $interval, $ionicHistory, $ionicModal, ionicToast, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, sendFlowService, shapeshiftService, soundService, $state, $timeout, txConfirmNotification, txFormatService, walletService) {
var vm = this;

vm.buttonText = '';
Expand Down Expand Up @@ -105,7 +105,10 @@ angular
if (err) {
// Error stop here
ongoingProcess.set('connectingShapeshift', false);
popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString(), function onAlert() {
popupService.showConfirm(gettextCatalog.getString('Shapeshift Error'), err.toString(), gettextCatalog.getString('Open') + " Shapeshift", gettextCatalog.getString('Go Back'), function onConfirm(hasConfirm) {
if (hasConfirm) {
externalLinkService.open("https://shapeshift.io");
}
$ionicHistory.goBack();
});
} else {
Expand Down

0 comments on commit 464ed67

Please sign in to comment.