-
-
Notifications
You must be signed in to change notification settings - Fork 775
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #2232 - Adjust ENS hash txns to allow blank, switch to default em…
…pty str, and catch if empty (#2233)
- Loading branch information
Showing
8 changed files
with
102 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
function signMsgAndCreateSubdomain(message, from) { | ||
var msg = web3.toHex(message) | ||
var params = [msg, from]; | ||
var msg = web3.toHex(message); | ||
var params = [ msg, from ]; | ||
var method = 'personal_sign'; | ||
|
||
web3.currentProvider.sendAsync({ | ||
method, | ||
params, | ||
from, | ||
}, function (err, result) { | ||
if (err) return console.error(err) | ||
if (result.error) return console.error(result.error) | ||
$.post( "", { 'signedMsg' : result.result, 'signer': from }, function( data ) { | ||
alert(data.msg); | ||
location.reload(); | ||
}); | ||
from | ||
}, function(err, result) { | ||
if (err) | ||
return console.error(err); | ||
if (result.error) | ||
return console.error(result.error); | ||
$.post('', { 'signedMsg': result.result, 'signer': from }, function(data) { | ||
alert(data.msg); | ||
location.reload(); | ||
}); | ||
}); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
window.onload = function () { | ||
$("#register")[0].onclick = function (e) { | ||
if ($("#tos")[0].checked === false) { | ||
return alert('Please check the TOS checkbox.') | ||
window.onload = function() { | ||
$('#register')[0].onclick = function(e) { | ||
if ($('#tos')[0].checked === false) { | ||
return alert('Please check the TOS checkbox.'); | ||
} | ||
if (typeof web3 == 'undefined') { | ||
return alert('Please install metamask in your browser and try again.') | ||
return alert('Please install metamask in your browser and try again.'); | ||
} | ||
// Get the github handle | ||
githubHandle = $("#githubHandle").text() | ||
githubHandle = $('#githubHandle').text(); | ||
// Get the current account and call sign function: | ||
web3.eth.getAccounts(function (err, accounts) { | ||
if (!accounts) return | ||
signMsgAndCreateSubdomain('Github Username : ' + $("#githubHandle").text(), accounts[0]); | ||
web3.eth.getAccounts(function(err, accounts) { | ||
if (!accounts) | ||
return; | ||
signMsgAndCreateSubdomain('Github Username : ' + $('#githubHandle').text(), accounts[0]); | ||
}); | ||
}; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated by Django 2.1.1 on 2018-09-17 20:43 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('enssubdomain', '0007_enssubdomainregistration_gas_cost_eth'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='enssubdomainregistration', | ||
name='txn_hash_1', | ||
field=models.CharField(blank=True, max_length=255), | ||
), | ||
migrations.AlterField( | ||
model_name='enssubdomainregistration', | ||
name='txn_hash_2', | ||
field=models.CharField(blank=True, max_length=255), | ||
), | ||
migrations.AlterField( | ||
model_name='enssubdomainregistration', | ||
name='txn_hash_3', | ||
field=models.CharField(blank=True, max_length=255), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 2.1.1 on 2018-09-17 20:43 | ||
|
||
import django.contrib.postgres.fields.jsonb | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('marketing', '0035_accountdeletionrequest'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='accountdeletionrequest', | ||
name='profile', | ||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters