+
{{home.error|translate}}
diff --git a/src/js/controllers/create.js b/src/js/controllers/create.js
index 1433ccdb9..48a3c815a 100644
--- a/src/js/controllers/create.js
+++ b/src/js/controllers/create.js
@@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('createController',
- function($scope, $rootScope, $location, $timeout, $log, lodash, go, profileService, configService, isCordova, gettext, ledger, trezor, isMobile, isChromeApp, isDevel, derivationPathHelper) {
+ function($scope, $location, $anchorScroll, $rootScope, $timeout, $log, lodash, go, profileService, configService, isCordova, gettext, ledger, trezor, isMobile, isChromeApp, isDevel, derivationPathHelper) {
var self = this;
var defaults = configService.getDefaults();
@@ -164,6 +164,7 @@ angular.module('copayApp.controllers').controller('createController',
if (err) {
$log.warn(err);
self.error = err;
+ scrollUp();
$timeout(function() {
$rootScope.$apply();
});
@@ -174,6 +175,11 @@ angular.module('copayApp.controllers').controller('createController',
}, 100);
}
+ function scrollUp(){
+ $location.hash('notification');
+ $anchorScroll();
+ };
+
this.formFocus = function(what) {
if (!this.isWindowsPhoneApp) return
diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js
index 737849652..49ae1d1d8 100644
--- a/src/js/controllers/walletHome.js
+++ b/src/js/controllers/walletHome.js
@@ -1,6 +1,6 @@
'use strict';
-angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $timeout, $filter, $modal, $log, notification, txStatus, isCordova, isMobile, profileService, lodash, configService, rateService, storageService, bitcore, isChromeApp, gettext, gettextCatalog, nodeWebkit, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, txSignService) {
+angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $location, $anchorScroll, $rootScope, $timeout, $filter, $modal, $log, notification, txStatus, isCordova, isMobile, profileService, lodash, configService, rateService, storageService, bitcore, isChromeApp, gettext, gettextCatalog, nodeWebkit, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, txSignService) {
var self = this;
window.ignoreMobilePause = false;
@@ -97,6 +97,11 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$rootScope.$digest();
});
+ this.scrollUp = function(){
+ $location.hash('notification');
+ $anchorScroll();
+ };
+
var accept_msg = gettextCatalog.getString('Accept');
var cancel_msg = gettextCatalog.getString('Cancel');
var confirm_msg = gettextCatalog.getString('Confirm');
@@ -596,7 +601,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
});
};
- // Send
+ // Send
this.canShowAlternative = function() {
return $scope.showAlternative;
@@ -739,7 +744,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
fc.credentials.m > 1 ? gettextCatalog.getString('Could not create payment proposal') : gettextCatalog.getString('Could not send payment');
this.error = bwsError.msg(err, prefix);
-
+ this.scrollUp();
$timeout(function() {
$scope.$digest();
}, 1);
@@ -1076,7 +1081,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
}
};
- // History
+ // History
function strip(number) {
return (parseFloat(number.toPrecision(12)));