remove statusAccount from enssubdomain registry tests

This commit is contained in:
Barry Gitarts 2018-08-10 10:36:21 -04:00 committed by Barry G
parent e6428cc331
commit 6d48a33509
2 changed files with 5 additions and 22 deletions

View File

@ -69,15 +69,13 @@ contract ENSSubdomainRegistry is Controlled {
* @param _account optional address to set at public resolver
* @param _pubkeyA optional pubkey part A to set at public resolver
* @param _pubkeyB optional pubkey part B to set at public resolver
* @param _statusAccount optional contact code to set at text in public resolver
*/
function register(
bytes32 _userHash,
bytes32 _domainHash,
address _account,
bytes32 _pubkeyA,
bytes32 _pubkeyB,
string _statusAccount
bytes32 _pubkeyB
)
external
returns(bytes32 subdomainHash)
@ -102,9 +100,6 @@ contract ENSSubdomainRegistry is Controlled {
if (resolvePubkey) {
resolver.setPubkey(subdomainHash, _pubkeyA, _pubkeyB);
}
if (bytes(_statusAccount).length != 0) {
resolver.setText(subdomainHash, "statusAccount", _statusAccount);
}
ens.setOwner(subdomainHash, msg.sender);
}else {
//transfer ownship of subdone to registrant

View File

@ -119,7 +119,6 @@ contract('ENSSubdomainRegistry', function () {
domains.free.namehash,
utils.zeroAddress,
utils.zeroBytes32,
utils.zeroBytes32,
utils.zeroBytes32
).send({from: registrant});
@ -144,7 +143,6 @@ contract('ENSSubdomainRegistry', function () {
domains.free.namehash,
registrant,
utils.zeroBytes32,
utils.zeroBytes32,
utils.zeroBytes32
).send({from: registrant});
@ -172,17 +170,14 @@ contract('ENSSubdomainRegistry', function () {
domains.free.namehash,
registrant,
points.x,
points.y,
contactCode
points.y
).send({from: registrant});
result = await ens.methods.owner(usernameHash).call()
assert.equal(result, registrant, "Owner not set");
result = await ens.methods.resolver(usernameHash).call()
assert.equal(result, PublicResolver.address, "PublicResolver not set");
result = await PublicResolver.methods.text(usernameHash, "statusAccount").call()
assert.equal(result, contactCode, "Resolved contact code not set");
result = await PublicResolver.methods.pubkey(usernameHash).call()
result = await PublicResolver.methods.pubkey(usernameHash).call();
let pubKey = utils.keyFromXY(result[0], result[1]);
assert.equal(pubKey, contactCode, "pubKey does not match contract code");
});
@ -199,8 +194,7 @@ contract('ENSSubdomainRegistry', function () {
domains.free.namehash,
utils.zeroAddress,
pubkey[0],
pubkey[1],
utils.zeroBytes32
pubkey[1]
).send({from: registrant});
//TODO: check events
@ -228,8 +222,7 @@ contract('ENSSubdomainRegistry', function () {
domains.free.namehash,
registrant,
pubkey[0],
pubkey[1],
utils.zeroBytes32
pubkey[1]
).send({from: registrant});
//TODO: check events
@ -255,7 +248,6 @@ contract('ENSSubdomainRegistry', function () {
domains.free.namehash,
utils.zeroAddress,
utils.zeroBytes32,
utils.zeroBytes32,
utils.zeroBytes32
).send({from: registrant});
let releaseDelay = await ENSSubdomainRegistry.methods.releaseDelay().call();
@ -297,7 +289,6 @@ contract('ENSSubdomainRegistry', function () {
domains.paid.namehash,
utils.zeroAddress,
utils.zeroBytes32,
utils.zeroBytes32,
utils.zeroBytes32
).send({from: registrant});
@ -331,7 +322,6 @@ contract('ENSSubdomainRegistry', function () {
domains.paid.namehash,
utils.zeroAddress,
utils.zeroBytes32,
utils.zeroBytes32,
utils.zeroBytes32
).send({from: registrant});
@ -372,7 +362,6 @@ contract('ENSSubdomainRegistry', function () {
domains.paid.namehash,
utils.zeroAddress,
utils.zeroBytes32,
utils.zeroBytes32,
utils.zeroBytes32
).send({from: registrant});
await ens.methods.setOwner(usernameHash, newOwner).send({from: registrant});
@ -414,7 +403,6 @@ contract('ENSSubdomainRegistry', function () {
domains.paid.namehash,
utils.zeroAddress,
utils.zeroBytes32,
utils.zeroBytes32,
utils.zeroBytes32
).send({from: registrant});
await ens.methods.setOwner(usernameHash, newOwner).send({from: registrant});