From eeb2509b39feb86cb69b6746909de21aa702786e Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Mon, 12 Sep 2016 14:41:47 +0200 Subject: [PATCH 1/4] refactor(SecondPassword): rename ChangeSecondPasswordControlller to Manage --- app/partials/settings/security.jade | 2 +- .../manageSecondPassword.controller.js} | 4 ++-- .../settings_change_second_password_ctrl_spec.coffee | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename assets/js/controllers/{changeSecondPassword.controller.js => settings/manageSecondPassword.controller.js} (90%) diff --git a/app/partials/settings/security.jade b/app/partials/settings/security.jade index 2fc655b2ea..ab4ea33a88 100644 --- a/app/partials/settings/security.jade +++ b/app/partials/settings/security.jade @@ -36,7 +36,7 @@ h5.well.type-h5.em-400.hidden-xs(translate="SECURITY_BASIC_EXPLAIN") .col-sm-12.col-md-6(ng-show="active") include ./change-password-hint.jade - .form-group.mbn.border-bottom.clearfix.pvl(ng-controller="ChangeSecondPasswordCtrl") + .form-group.mbn.border-bottom.clearfix.pvl(ng-controller="ManageSecondPasswordCtrl") div(settings-form) .col-sm-12.col-md-6 .flex-center.flex-between-mobile.mbm diff --git a/assets/js/controllers/changeSecondPassword.controller.js b/assets/js/controllers/settings/manageSecondPassword.controller.js similarity index 90% rename from assets/js/controllers/changeSecondPassword.controller.js rename to assets/js/controllers/settings/manageSecondPassword.controller.js index efa9309066..dece06045a 100644 --- a/assets/js/controllers/changeSecondPassword.controller.js +++ b/assets/js/controllers/settings/manageSecondPassword.controller.js @@ -1,8 +1,8 @@ angular .module('walletApp') - .controller('ChangeSecondPasswordCtrl', ChangeSecondPasswordCtrl); + .controller('ManageSecondPasswordCtrl', ManageSecondPasswordCtrl); -function ChangeSecondPasswordCtrl ($scope, Wallet, $timeout, MyWallet) { +function ManageSecondPasswordCtrl ($scope, Wallet, $timeout, MyWallet) { $scope.form = {}; $scope.fields = { password: '', diff --git a/tests/controllers/settings_change_second_password_ctrl_spec.coffee b/tests/controllers/settings_change_second_password_ctrl_spec.coffee index 2f095a3695..593f8c2573 100644 --- a/tests/controllers/settings_change_second_password_ctrl_spec.coffee +++ b/tests/controllers/settings_change_second_password_ctrl_spec.coffee @@ -1,4 +1,4 @@ -describe "ChangeSecondPasswordCtrl", -> +describe "ManageSecondPasswordCtrl", -> scope = undefined Wallet = undefined MyWallet = undefined @@ -21,7 +21,7 @@ describe "ChangeSecondPasswordCtrl", -> scope = $rootScope.$new() template = $templateCache.get('partials/settings/change-second-password.jade') - $controller "ChangeSecondPasswordCtrl", + $controller "ManageSecondPasswordCtrl", $scope: scope, $uibModalInstance: modalInstance From c745156fdc61ad7d39b679b22dcd5d2fc42a4cd7 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Mon, 12 Sep 2016 15:37:00 +0200 Subject: [PATCH 2/4] fix(SecondPassword): removing happens inside modal and triggers logout --- .../settings/remove-second-password.jade | 40 ++++++++++ .../manageSecondPassword.controller.js | 11 +-- .../removeSecondPassword.controller.js | 41 +++++++++++ assets/js/services/wallet.service.js | 73 +++++++++---------- locales/en-human.json | 2 + 5 files changed, 123 insertions(+), 44 deletions(-) create mode 100644 app/partials/settings/remove-second-password.jade create mode 100644 assets/js/controllers/settings/removeSecondPassword.controller.js diff --git a/app/partials/settings/remove-second-password.jade b/app/partials/settings/remove-second-password.jade new file mode 100644 index 0000000000..cfe2b0dcdc --- /dev/null +++ b/app/partials/settings/remove-second-password.jade @@ -0,0 +1,40 @@ +form(role="form" name="form" novalidate) + .modal-header + .flex-center.pam + h3.man.mrm(translate="REMOVE_SECOND_PASSWORD") + .modal-body + .alert-in-app + alerts(context="alerts") + p(ng-show='status.removed' translate='SECOND_PASSWORD_REMOVE_LOGOUT') + .form-group(ng-class="{ 'has-error': form.password.$invalid && form.password.$touched, 'has-success': form.password.$valid }") + label.control-label(translate="SECOND_PASSWORD") + div + input.form-control( + type="password" + name="password" + ng-model="fields.password" + is-valid="validateSecondPassword(fields.password)" + required + focus-when="active" + ng-disabled="status.waiting || status.removed" + ) + .modal-footer.pal.flex-end.flex-center + .form-group.mbn.has-error.pull-right.right-align + button.button-muted( + ng-click="cancel()" + translate="CANCEL" + ng-hide="status.waiting || status.removed" + ) + button.button-success( + ui-ladda="status.waiting" + ng-click="removeSecondPassword()" + ng-disabled="form.$invalid" + ladda-translate="REMOVE_SECOND_PASSWORD" + data-style="expand-left" + ng-hide="status.removed" + ) + button.button-success( + ng-click="logout()" + translate="LOGOUT" + ng-show="status.removed" + ) diff --git a/assets/js/controllers/settings/manageSecondPassword.controller.js b/assets/js/controllers/settings/manageSecondPassword.controller.js index dece06045a..0515bffa7f 100644 --- a/assets/js/controllers/settings/manageSecondPassword.controller.js +++ b/assets/js/controllers/settings/manageSecondPassword.controller.js @@ -2,7 +2,7 @@ angular .module('walletApp') .controller('ManageSecondPasswordCtrl', ManageSecondPasswordCtrl); -function ManageSecondPasswordCtrl ($scope, Wallet, $timeout, MyWallet) { +function ManageSecondPasswordCtrl ($scope, Wallet, $timeout, MyWallet, $uibModal) { $scope.form = {}; $scope.fields = { password: '', @@ -22,10 +22,11 @@ function ManageSecondPasswordCtrl ($scope, Wallet, $timeout, MyWallet) { }; $scope.removeSecondPassword = () => { - if ($scope.status.waiting) return; - $scope.status.waiting = true; - let done = () => $scope.status.waiting = false; - Wallet.removeSecondPassword(done, done); + $uibModal.open({ + templateUrl: 'partials/settings/remove-second-password.jade', + windowClass: 'bc-modal initial', + controller: 'RemoveSecondPasswordCtrl' + }); }; $scope.isMainPassword = Wallet.isCorrectMainPassword; diff --git a/assets/js/controllers/settings/removeSecondPassword.controller.js b/assets/js/controllers/settings/removeSecondPassword.controller.js new file mode 100644 index 0000000000..9fef4ae484 --- /dev/null +++ b/assets/js/controllers/settings/removeSecondPassword.controller.js @@ -0,0 +1,41 @@ +angular + .module('walletApp') + .controller('RemoveSecondPasswordCtrl', RemoveSecondPasswordCtrl); + +function RemoveSecondPasswordCtrl ($scope, Wallet, $timeout, Alerts, $uibModalInstance, $window) { + $scope.alerts = []; + $scope.status = { + waiting: false, + removed: false + }; + $scope.form = {}; + $scope.fields = { + password: '' + }; + + $scope.validateSecondPassword = Wallet.validateSecondPassword; + + $scope.cancel = () => { + $uibModalInstance.dismiss(''); + }; + + $scope.logout = () => { + $window.location.reload('/wallet/#/login/' + Wallet.guid); + }; + + $scope.removeSecondPassword = () => { + if ($scope.status.waiting) return; + $scope.status.waiting = true; + let success = () => { + Alerts.displaySuccess('SECOND_PASSWORD_REMOVE_SUCCESS', true, $scope.alerts); + $scope.status.waiting = false; + $scope.status.removed = true; + }; + let error = () => { + Alerts.displayError('SECOND_PASSWORD_REMOVE_ERR'); + $scope.status.waiting = false; + }; + + Wallet.removeSecondPassword($scope.fields.password, success, error); + }; +} diff --git a/assets/js/services/wallet.service.js b/assets/js/services/wallet.service.js index dddfb3d718..aaff51e013 100644 --- a/assets/js/services/wallet.service.js +++ b/assets/js/services/wallet.service.js @@ -1157,60 +1157,55 @@ function Wallet ($http, $window, $timeout, $location, $injector, Alerts, MyWalle }); }; - wallet.removeSecondPassword = (successCallback, errorCallback) => { + wallet.removeSecondPassword = (password, successCallback, errorCallback) => { let success = () => { - Alerts.displaySuccess('Second password has been removed.'); wallet.settings.secondPassword = false; successCallback(); }; let error = () => { - Alerts.displayError('SECOND_PASSWORD_REMOVE_ERR'); errorCallback(); }; - let cancel = errorCallback; let decrypting = () => { console.log('Decrypting...'); }; let syncing = () => { console.log('Syncing...'); }; - let proceedWithPassword = (password) => { - const didDecrypt = () => { - // Check which metadata service features we use: - - // whatsNew - // This falls back to cookies if 2nd password is enabled: - let whatsNewViewed = $cookies.get('whatsNewViewed'); - if (whatsNewViewed) { - let whatsNew = new MyWalletMetadata(2); - - whatsNew.fetch().then((res) => { - if (res === null) { - whatsNew.create({lastViewed: whatsNewViewed}).then(() => { - // TODO: uncomment once cookie fallback is removed - // $cookies.remove('whatsNewViewed'); - success(); - }); - } else { - whatsNew.update({lastViewed: whatsNewViewed}).then(() => { - // TODO: uncomment once cookie fallback is removed - // $cookies.remove('whatsNewViewed'); - success(); - }); - } - }).catch(() => { - // The What's New section may be marked (partially) unread at the - // next login. - success(); - }); - } else { - success(); - } - }; - wallet.my.wallet.decrypt(password, didDecrypt, error, decrypting, syncing); + const didDecrypt = () => { + // Check which metadata service features we use: + + // whatsNew + // This falls back to cookies if 2nd password is enabled: + let whatsNewViewed = $cookies.get('whatsNewViewed'); + if (whatsNewViewed) { + let whatsNew = new MyWalletMetadata(2); + + whatsNew.fetch().then((res) => { + if (res === null) { + whatsNew.create({lastViewed: whatsNewViewed}).then(() => { + // TODO: uncomment once cookie fallback is removed + // $cookies.remove('whatsNewViewed'); + success(); + }); + } else { + whatsNew.update({lastViewed: whatsNewViewed}).then(() => { + // TODO: uncomment once cookie fallback is removed + // $cookies.remove('whatsNewViewed'); + success(); + }); + } + }).catch(() => { + // The What's New section may be marked (partially) unread at the + // next login. + success(); + }); + } else { + success(); + } }; - wallet.askForSecondPasswordIfNeeded().then(proceedWithPassword).catch(cancel); + + wallet.my.wallet.decrypt(password, didDecrypt, error, decrypting, syncing); }; wallet.validateSecondPassword = (password) => diff --git a/locales/en-human.json b/locales/en-human.json index 53b8094ac7..105a46ecf0 100644 --- a/locales/en-human.json +++ b/locales/en-human.json @@ -275,6 +275,8 @@ "SECOND_PASSWORD_EXPLAIN" : "For Additional security, you can choose a second password that is required whenever you want to spend bitcoins. This is different from your standard wallet password. If you set your second wallet password, don’t forget it!", "SECOND_PASSWORD_WARNING" : "This is different from your standard wallet password. If you set your second wallet password, don’t forget it!", "SECOND_PASSWORD_CANCEL": "Your second password is required to send bitcoin. Please try again", + "SECOND_PASSWORD_REMOVE_SUCCESS" : "Second password has been removed.", + "SECOND_PASSWORD_REMOVE_LOGOUT" : "You need to logout and then login again to proceed.", "SECOND_PASSWORD_REMOVE_ERR": "Second password cannot be removed. Please contact support.", "REMEMBER_2FA" : "Remember 2-step Verification", "REMEMBER_2FA_EXPLAIN" : "Your browser will be remembered for a short period of time, allowing you to login again without having to re-authenticate. Disable this to require full authentication every time you login. This will not affect your current browser until you delete all cookies.", From f7b959f3328d6bb132454bf69a5cf6a763e2779d Mon Sep 17 00:00:00 2001 From: plondon Date: Tue, 13 Sep 2016 17:57:58 -0400 Subject: [PATCH 3/4] refactor(SecondPassword): do removal inline --- ...sword.jade => manage-second-password.jade} | 15 +++++-- .../settings/remove-second-password.jade | 40 ------------------ app/partials/settings/security.jade | 6 +-- .../manageSecondPassword.controller.js | 34 +++++++++++---- .../removeSecondPassword.controller.js | 41 ------------------- assets/js/controllers/wallet.controller.js | 4 ++ locales/en-human.json | 4 +- 7 files changed, 48 insertions(+), 96 deletions(-) rename app/partials/settings/{change-second-password.jade => manage-second-password.jade} (72%) delete mode 100644 app/partials/settings/remove-second-password.jade delete mode 100644 assets/js/controllers/settings/removeSecondPassword.controller.js diff --git a/app/partials/settings/change-second-password.jade b/app/partials/settings/manage-second-password.jade similarity index 72% rename from app/partials/settings/change-second-password.jade rename to app/partials/settings/manage-second-password.jade index b2bbc41d04..35f3b33d5c 100644 --- a/app/partials/settings/change-second-password.jade +++ b/app/partials/settings/manage-second-password.jade @@ -10,19 +10,19 @@ form(role="form" name="form" novalidate) minlength="4" is-valid="!isPasswordHint(fields.password) && !isMainPassword(fields.password)" required - focus-when="active") + focus-when="active && !settings.secondPassword") span.help-block(ng-show="form.password.$touched") span(translate="TOO_SHORT" ng-show="form.password.$error.minlength") span(translate="CANT_USE_HINT" ng-show="form.password.$error.isValid && isPasswordHint(fields.password)") span(translate="CANT_USE_MAIN" ng-show="form.password.$error.isValid && isMainPassword(fields.password)") - .form-group(ng-class="{ 'has-error': form.confirmation.$invalid && form.confirmation.$touched, 'has-success': form.confirmation.$valid }") + .form-group(ng-hide="settings.secondPassword" ng-class="{ 'has-error': form.confirmation.$invalid && form.confirmation.$touched, 'has-success': form.confirmation.$valid }") label.control-label(translate="CONFIRM_PASSWORD") div input.form-control( type="password" name="confirmation" ng-model="fields.confirmation" - is-valid="fields.confirmation === fields.password" + is-valid="fields.confirmation === fields.password && !settings.secondPassword" on-enter="setPassword()" required) span.help-block(ng-show="form.confirmation.$touched") @@ -30,8 +30,17 @@ form(role="form" name="form" novalidate) .form-group.mbn.has-error.pull-right.right-align button.button-muted(ng-click="deactivate()" translate="CANCEL" ng-hide="status.waiting") button.button-success( + ng-hide="settings.secondPassword" ui-ladda="status.waiting" ng-click="setPassword()" ng-disabled="form.$invalid" ladda-translate="SET_PASSWORD" data-style="expand-left") + button.button-danger( + ng-show="settings.secondPassword" + ui-ladda="status.waiting" + ng-disabled="form.password.$invalid" + ng-click="removeSecondPassword()" + ladda-translate="REMOVE_SECOND_PASSWORD" + data-style="expand-left" + ) diff --git a/app/partials/settings/remove-second-password.jade b/app/partials/settings/remove-second-password.jade deleted file mode 100644 index cfe2b0dcdc..0000000000 --- a/app/partials/settings/remove-second-password.jade +++ /dev/null @@ -1,40 +0,0 @@ -form(role="form" name="form" novalidate) - .modal-header - .flex-center.pam - h3.man.mrm(translate="REMOVE_SECOND_PASSWORD") - .modal-body - .alert-in-app - alerts(context="alerts") - p(ng-show='status.removed' translate='SECOND_PASSWORD_REMOVE_LOGOUT') - .form-group(ng-class="{ 'has-error': form.password.$invalid && form.password.$touched, 'has-success': form.password.$valid }") - label.control-label(translate="SECOND_PASSWORD") - div - input.form-control( - type="password" - name="password" - ng-model="fields.password" - is-valid="validateSecondPassword(fields.password)" - required - focus-when="active" - ng-disabled="status.waiting || status.removed" - ) - .modal-footer.pal.flex-end.flex-center - .form-group.mbn.has-error.pull-right.right-align - button.button-muted( - ng-click="cancel()" - translate="CANCEL" - ng-hide="status.waiting || status.removed" - ) - button.button-success( - ui-ladda="status.waiting" - ng-click="removeSecondPassword()" - ng-disabled="form.$invalid" - ladda-translate="REMOVE_SECOND_PASSWORD" - data-style="expand-left" - ng-hide="status.removed" - ) - button.button-success( - ng-click="logout()" - translate="LOGOUT" - ng-show="status.removed" - ) diff --git a/app/partials/settings/security.jade b/app/partials/settings/security.jade index ab4ea33a88..0b3e215420 100644 --- a/app/partials/settings/security.jade +++ b/app/partials/settings/security.jade @@ -45,11 +45,11 @@ h5.well.type-h5.em-400.hidden-xs(translate="SECURITY_BASIC_EXPLAIN") span.label.label-success(translate="SECOND_PASSWORD_SET", ng-show="settings.secondPassword") p.em-300.text.hidden-xs(translate="WALLET_SECOND_PASSWORD_EXPLAIN" ng-hide="userHasExchangeAcct") p.em-300.text.hidden-xs.security-red(translate="WALLET_SECOND_PASSWORD_DISABLED_EXPLAIN" ng-show="userHasExchangeAcct") - .col-sm-12.col-md-6.setting-result(ng-hide="active") + .col-sm-12.col-md-6.setting-result(ng-hide="active || removing") button.button-primary.display-inline-block(ng-click="activate()", translate="SET_SECOND_PASSWORD", ng-show="!settings.secondPassword" ng-disabled="userHasExchangeAcct") - a.button-primary.display-inline-block(ng-click="removeSecondPassword()", ladda-translate="REMOVE_SECOND_PASSWORD", ng-show="settings.secondPassword", ui-ladda="status.waiting", data-style="expand-right") + button.button-danger.display-inline-block.mlm(ng-click="activate()" translate="REMOVE_SECOND_PASSWORD" ng-show="settings.secondPassword") .col-sm-12.col-md-6(ng-show="active") - include ./change-second-password.jade + include ./manage-second-password.jade .form-group.mbn.border-bottom.clearfix.pvl .col-sm-12.col-md-6 diff --git a/assets/js/controllers/settings/manageSecondPassword.controller.js b/assets/js/controllers/settings/manageSecondPassword.controller.js index 0515bffa7f..6e1a7a55ae 100644 --- a/assets/js/controllers/settings/manageSecondPassword.controller.js +++ b/assets/js/controllers/settings/manageSecondPassword.controller.js @@ -2,12 +2,19 @@ angular .module('walletApp') .controller('ManageSecondPasswordCtrl', ManageSecondPasswordCtrl); -function ManageSecondPasswordCtrl ($scope, Wallet, $timeout, MyWallet, $uibModal) { +function ManageSecondPasswordCtrl ($rootScope, $scope, Wallet, $timeout, MyWallet, $uibModal, Alerts) { $scope.form = {}; $scope.fields = { password: '', confirmation: '' }; + $scope.status = { + waiting: false, + removed: false + }; + + $scope.isMainPassword = Wallet.isCorrectMainPassword; + $scope.validateSecondPassword = Wallet.validateSecondPassword; // TODO: add function to My-Wallet-V3 to check if the user has any exchange account: $scope.userHasExchangeAcct = MyWallet.wallet.external && @@ -22,14 +29,25 @@ function ManageSecondPasswordCtrl ($scope, Wallet, $timeout, MyWallet, $uibModal }; $scope.removeSecondPassword = () => { - $uibModal.open({ - templateUrl: 'partials/settings/remove-second-password.jade', - windowClass: 'bc-modal initial', - controller: 'RemoveSecondPasswordCtrl' - }); - }; + if ($scope.status.waiting) return; + $scope.status.waiting = true; + $scope.$safeApply(); - $scope.isMainPassword = Wallet.isCorrectMainPassword; + let success = () => { + Alerts.displaySuccess('SECOND_PASSWORD_REMOVE_SUCCESS', true); + $scope.status.waiting = false; + $scope.status.removed = true; + $scope.deactivate(); + }; + let error = () => { + Alerts.displayError('SECOND_PASSWORD_REMOVE_ERR'); + $scope.status.waiting = false; + $scope.deactivate(); + }; + + Wallet.removeSecondPassword($scope.fields.password, success, error); + $rootScope.needsRefresh = true; + }; $scope.isPasswordHint = (candidate) => { return Wallet.user.passwordHint && candidate === Wallet.user.passwordHint; diff --git a/assets/js/controllers/settings/removeSecondPassword.controller.js b/assets/js/controllers/settings/removeSecondPassword.controller.js deleted file mode 100644 index 9fef4ae484..0000000000 --- a/assets/js/controllers/settings/removeSecondPassword.controller.js +++ /dev/null @@ -1,41 +0,0 @@ -angular - .module('walletApp') - .controller('RemoveSecondPasswordCtrl', RemoveSecondPasswordCtrl); - -function RemoveSecondPasswordCtrl ($scope, Wallet, $timeout, Alerts, $uibModalInstance, $window) { - $scope.alerts = []; - $scope.status = { - waiting: false, - removed: false - }; - $scope.form = {}; - $scope.fields = { - password: '' - }; - - $scope.validateSecondPassword = Wallet.validateSecondPassword; - - $scope.cancel = () => { - $uibModalInstance.dismiss(''); - }; - - $scope.logout = () => { - $window.location.reload('/wallet/#/login/' + Wallet.guid); - }; - - $scope.removeSecondPassword = () => { - if ($scope.status.waiting) return; - $scope.status.waiting = true; - let success = () => { - Alerts.displaySuccess('SECOND_PASSWORD_REMOVE_SUCCESS', true, $scope.alerts); - $scope.status.waiting = false; - $scope.status.removed = true; - }; - let error = () => { - Alerts.displayError('SECOND_PASSWORD_REMOVE_ERR'); - $scope.status.waiting = false; - }; - - Wallet.removeSecondPassword($scope.fields.password, success, error); - }; -} diff --git a/assets/js/controllers/wallet.controller.js b/assets/js/controllers/wallet.controller.js index 063093ff74..7b7f3617c1 100644 --- a/assets/js/controllers/wallet.controller.js +++ b/assets/js/controllers/wallet.controller.js @@ -8,6 +8,7 @@ function WalletCtrl ($scope, $rootScope, Wallet, $uibModal, $timeout, Alerts, $i $scope.status = Wallet.status; $scope.settings = Wallet.settings; $rootScope.isMock = Wallet.isMock; + $rootScope.needsRefresh = false; $scope.menu = { isCollapsed: false @@ -97,6 +98,9 @@ function WalletCtrl ($scope, $rootScope, Wallet, $uibModal, $timeout, Alerts, $i if (wallet && wallet.isDoubleEncrypted && toState.name === 'wallet.common.buy-sell') { event.preventDefault(); Alerts.displayError('MUST_DISABLE_2ND_PW'); + } else if (wallet && $rootScope.needsRefresh && toState.name === 'wallet.common.buy-sell') { + event.preventDefault(); + Alerts.displayError('NEEDS_REFRESH'); } }); diff --git a/locales/en-human.json b/locales/en-human.json index 105a46ecf0..e290b8087b 100644 --- a/locales/en-human.json +++ b/locales/en-human.json @@ -272,6 +272,7 @@ "UNARCHIVE" : "Unarchive", "DELETE" : "Delete", "SECOND_PASSWORD" : "Second Password", + "CURRENT_SECOND_PASSWORD": "Current Second Password", "SECOND_PASSWORD_EXPLAIN" : "For Additional security, you can choose a second password that is required whenever you want to spend bitcoins. This is different from your standard wallet password. If you set your second wallet password, don’t forget it!", "SECOND_PASSWORD_WARNING" : "This is different from your standard wallet password. If you set your second wallet password, don’t forget it!", "SECOND_PASSWORD_CANCEL": "Your second password is required to send bitcoin. Please try again", @@ -1012,5 +1013,6 @@ "VERIFY_EMAIL": "Verify email:", "ACCEPT_TERMS": "Coinify account terms:", "SELECT_PAYMENT_METHOD": "Select your preferred payment method:", - "PAYMENT_FEE": "Payment Fee:" + "PAYMENT_FEE": "Payment Fee:", + "NEEDS_REFRESH": "Please refresh your wallet to access this feature." } From 4bd73d1329315750f325e1fb3138d065de953bdf Mon Sep 17 00:00:00 2001 From: plondon Date: Tue, 13 Sep 2016 18:01:47 -0400 Subject: [PATCH 4/4] tests(SecondPassword): fix tests --- .../settings_change_second_password_ctrl_spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/controllers/settings_change_second_password_ctrl_spec.coffee b/tests/controllers/settings_change_second_password_ctrl_spec.coffee index 593f8c2573..38dd09769b 100644 --- a/tests/controllers/settings_change_second_password_ctrl_spec.coffee +++ b/tests/controllers/settings_change_second_password_ctrl_spec.coffee @@ -19,7 +19,7 @@ describe "ManageSecondPasswordCtrl", -> external: {} scope = $rootScope.$new() - template = $templateCache.get('partials/settings/change-second-password.jade') + template = $templateCache.get('partials/settings/manage-second-password.jade') $controller "ManageSecondPasswordCtrl", $scope: scope,