Merge pull request #364 from Bitcoin-com/wallet/task/546
546 - Handle shapeshift error
This commit is contained in:
commit
464ed67ed5
1 changed files with 5 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ angular
|
||||||
.module('copayApp.controllers')
|
.module('copayApp.controllers')
|
||||||
.controller('reviewController', reviewController);
|
.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;
|
var vm = this;
|
||||||
|
|
||||||
vm.buttonText = '';
|
vm.buttonText = '';
|
||||||
|
|
@ -105,7 +105,10 @@ angular
|
||||||
if (err) {
|
if (err) {
|
||||||
// Error stop here
|
// Error stop here
|
||||||
ongoingProcess.set('connectingShapeshift', false);
|
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();
|
$ionicHistory.goBack();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue