Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Commit

Permalink
edge case fix for subdomain registration
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Mar 9, 2018
1 parent db52dc6 commit e0129b6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app/includes/ens.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
</h1>
</div>
<!-- / Title -->
<div ng-show="visibility=='ens'">
<div ng-if="visibility=='ens'">
@@if (site === 'mew' ) { @@include( './ens-domain.tpl', { "site": "mew" } ) }
@@if (site === 'cx' ) { @@include( './ens-domain.tpl', { "site": "cx" } ) }
</div>
<div ng-show="visibility=='subdomain'">
<div ng-if="visibility=='subdomain'">
<div class="block">
<!-- ENS Title -->
<article class="cont-md">
Expand Down
6 changes: 3 additions & 3 deletions app/scripts/controllers/ensCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ var ensCtrl = function($scope, $sce, walletService) {
$scope.ajaxReq = ajaxReq;
$scope.hideEnsInfoPanel = false;
walletService.wallet = null;
$scope.ensConfirmModalModal = new Modal(document.getElementById('ensConfirmModal'));
$scope.ensFinalizeModal = new Modal(document.getElementById('ensFinalizeConfirm'));
$scope.Validator = Validator;
$scope.wd = false;
$scope.haveNotAlreadyCheckedLength = true;
Expand Down Expand Up @@ -57,7 +55,7 @@ var ensCtrl = function($scope, $sce, walletService) {
var resetToDefault = function() {
$scope.objENS = JSON.parse(JSON.stringify($scope.objENSClone));
$scope.objSub = JSON.parse(JSON.stringify($scope.objSubClone));
$scope.wallet= null;
$scope.wallet = null;
walletService.wallet = null;
$scope.wd = false;
}
Expand Down Expand Up @@ -166,6 +164,8 @@ var ensCtrl = function($scope, $sce, walletService) {
$scope.checkName = function() {
// checks if it's the same length as a PK and if so, warns them.
// If they confirm they can set haveNotAlreadyCheckedLength to true and carry on
$scope.ensConfirmModalModal = new Modal(document.getElementById('ensConfirmModal'));
$scope.ensFinalizeModal = new Modal(document.getElementById('ensFinalizeConfirm'));
if ($scope.haveNotAlreadyCheckedLength && ($scope.objENS.name.length == 128 || $scope.objENS.name.length == 132 || $scope.objENS.name.length == 64 || $scope.objENS.name.length == 66)) {
$scope.notifier.danger("That looks an awful lot like a private key. Are you sure you would like to check if this name is available on the ENS network? If so, click `Check`. If it is your private key, click refresh & try again.");
$scope.haveNotAlreadyCheckedLength = false;
Expand Down
4 changes: 2 additions & 2 deletions chrome-extension/cx-wallet.html
Original file line number Diff line number Diff line change
Expand Up @@ -3754,7 +3754,7 @@ <h1>
</h1>
</div>
<!-- / Title -->
<div ng-show="visibility=='ens'">
<div ng-if="visibility=='ens'">

<div class="block">
<!-- ENS Title -->
Expand Down Expand Up @@ -4820,7 +4820,7 @@ <h4 translate="SENDModal_Content_3"> Are you sure you want to do this? </h4>


</div>
<div ng-show="visibility=='subdomain'">
<div ng-if="visibility=='subdomain'">
<div class="block">
<!-- ENS Title -->
<article class="cont-md">
Expand Down
4 changes: 2 additions & 2 deletions chrome-extension/js/etherwallet-master.js
Original file line number Diff line number Diff line change
Expand Up @@ -2043,8 +2043,6 @@ var ensCtrl = function ensCtrl($scope, $sce, walletService) {
$scope.ajaxReq = ajaxReq;
$scope.hideEnsInfoPanel = false;
walletService.wallet = null;
$scope.ensConfirmModalModal = new Modal(document.getElementById('ensConfirmModal'));
$scope.ensFinalizeModal = new Modal(document.getElementById('ensFinalizeConfirm'));
$scope.Validator = Validator;
$scope.wd = false;
$scope.haveNotAlreadyCheckedLength = true;
Expand Down Expand Up @@ -2206,6 +2204,8 @@ var ensCtrl = function ensCtrl($scope, $sce, walletService) {
$scope.checkName = function () {
// checks if it's the same length as a PK and if so, warns them.
// If they confirm they can set haveNotAlreadyCheckedLength to true and carry on
$scope.ensConfirmModalModal = new Modal(document.getElementById('ensConfirmModal'));
$scope.ensFinalizeModal = new Modal(document.getElementById('ensFinalizeConfirm'));
if ($scope.haveNotAlreadyCheckedLength && ($scope.objENS.name.length == 128 || $scope.objENS.name.length == 132 || $scope.objENS.name.length == 64 || $scope.objENS.name.length == 66)) {
$scope.notifier.danger("That looks an awful lot like a private key. Are you sure you would like to check if this name is available on the ENS network? If so, click `Check`. If it is your private key, click refresh & try again.");
$scope.haveNotAlreadyCheckedLength = false;
Expand Down
4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3140,7 +3140,7 @@ <h1>
</h1>
</div>
<!-- / Title -->
<div ng-show="visibility=='ens'">
<div ng-if="visibility=='ens'">
<div class="block">
<!-- ENS Title -->
<article class="cont-md">
Expand Down Expand Up @@ -4206,7 +4206,7 @@ <h4 translate="SENDModal_Content_3"> Are you sure you want to do this? </h4>


</div>
<div ng-show="visibility=='subdomain'">
<div ng-if="visibility=='subdomain'">
<div class="block">
<!-- ENS Title -->
<article class="cont-md">
Expand Down
4 changes: 2 additions & 2 deletions dist/js/etherwallet-master.js
Original file line number Diff line number Diff line change
Expand Up @@ -2043,8 +2043,6 @@ var ensCtrl = function ensCtrl($scope, $sce, walletService) {
$scope.ajaxReq = ajaxReq;
$scope.hideEnsInfoPanel = false;
walletService.wallet = null;
$scope.ensConfirmModalModal = new Modal(document.getElementById('ensConfirmModal'));
$scope.ensFinalizeModal = new Modal(document.getElementById('ensFinalizeConfirm'));
$scope.Validator = Validator;
$scope.wd = false;
$scope.haveNotAlreadyCheckedLength = true;
Expand Down Expand Up @@ -2206,6 +2204,8 @@ var ensCtrl = function ensCtrl($scope, $sce, walletService) {
$scope.checkName = function () {
// checks if it's the same length as a PK and if so, warns them.
// If they confirm they can set haveNotAlreadyCheckedLength to true and carry on
$scope.ensConfirmModalModal = new Modal(document.getElementById('ensConfirmModal'));
$scope.ensFinalizeModal = new Modal(document.getElementById('ensFinalizeConfirm'));
if ($scope.haveNotAlreadyCheckedLength && ($scope.objENS.name.length == 128 || $scope.objENS.name.length == 132 || $scope.objENS.name.length == 64 || $scope.objENS.name.length == 66)) {
$scope.notifier.danger("That looks an awful lot like a private key. Are you sure you would like to check if this name is available on the ENS network? If so, click `Check`. If it is your private key, click refresh & try again.");
$scope.haveNotAlreadyCheckedLength = false;
Expand Down

0 comments on commit e0129b6

Please sign in to comment.