confirm screen: display address + back button logic in origin/destination screens
This commit is contained in:
parent
b88329fbb3
commit
79d6b4d7ad
2 changed files with 14 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $filter, $timeout, $ionicScrollDelegate, $ionicLoading, gettextCatalog, walletService, platformInfo, lodash, configService, $stateParams, $window, $state, $log, profileService, bitcore, bitcoreCash, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig, payproService, feeService, bwcError, txConfirmNotification, externalLinkService, firebaseEventsService, soundService) {
|
||||
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $filter, $timeout, $ionicScrollDelegate, $ionicLoading, gettextCatalog, walletService, platformInfo, lodash, configService, $stateParams, $window, $state, $log, profileService, bitcore, bitcoreCash, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig, payproService, feeService, bitcoinCashJsService, bwcError, txConfirmNotification, externalLinkService, firebaseEventsService, soundService) {
|
||||
|
||||
var countDown = null;
|
||||
var FEE_TOO_HIGH_LIMIT_PER = 15;
|
||||
|
|
@ -173,6 +173,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
setupTx(tx);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
var message = gettextCatalog.getString('Invalid address');
|
||||
popupService.showAlert(null, message, function () {
|
||||
$ionicHistory.nextViewOptions({
|
||||
|
|
@ -187,7 +188,12 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
}
|
||||
});
|
||||
|
||||
var setupTx = function(networkName, data) {
|
||||
var setupTx = function(tx) {
|
||||
if (tx.coin === 'bch') {
|
||||
tx.displayAddress = bitcoinCashJsService.readAddress(tx.toAddress).cashaddr;
|
||||
} else {
|
||||
tx.displayAddress = entry.address;
|
||||
}
|
||||
|
||||
// Other Scope vars
|
||||
$scope.isCordova = isCordova;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('sendFlowController', function($scope, $rootScope, $state, $stateParams, $log, configService, gettextCatalog, profileService) {
|
||||
angular.module('copayApp.controllers').controller('sendFlowController', function($scope, $rootScope, $state, $stateParams, $log, $ionicHistory, configService, gettextCatalog, profileService) {
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
var config = configService.getSync().wallet.settings;
|
||||
|
|
@ -60,4 +60,9 @@ angular.module('copayApp.controllers').controller('sendFlowController', function
|
|||
}
|
||||
$state.transitionTo(getNextStep(), $scope.params);
|
||||
};
|
||||
|
||||
$scope.goBack = function() {
|
||||
$ionicHistory.goBack();
|
||||
}
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue