diff --git a/index.html b/index.html
index ae445c855..272bb3d24 100644
--- a/index.html
+++ b/index.html
@@ -51,7 +51,12 @@
×
- Resend
+
Email not confirmed.
diff --git a/js/controllers/index.js b/js/controllers/index.js
index 8e1f4e689..6362fa1f6 100644
--- a/js/controllers/index.js
+++ b/js/controllers/index.js
@@ -1,19 +1,25 @@
'use strict';
-angular.module('copayApp.controllers').controller('IndexController', function($scope, go, isCordova, identityService, notification) {
+angular.module('copayApp.controllers').controller('IndexController', function($scope, $timeout, go, isCordova, identityService, notification) {
$scope.init = function() {
};
$scope.resendVerificationEmail = function() {
+ $scope.loading = true;
identityService.resendVerificationEmail(function(err) {
if (err) {
- notification.error('Could not send email', 'There was a problem sending the verification email.');
- setTimeout(function() {
- $scope.$digest();
- }, 1);
- return;
+ notification.error('Could not send email', 'There was a problem sending the verification email.');
}
+ else {
+ notification.success('Email sent', 'Check your inbox and confirms the email');
+ $scope.hideReSendButton = true;
+ }
+ $scope.loading = null;
+ $timeout(function() {
+ $scope.$digest();
+ }, 1);
+ return;
});
};