From 6d48a33509468ad441c403e676c47f3bb637e3de Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Fri, 10 Aug 2018 10:36:21 -0400 Subject: [PATCH] remove statusAccount from enssubdomain registry tests --- contracts/registry/ENSSubdomainRegistry.sol | 7 +------ test/enssubdomainregistry.js | 20 ++++---------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/contracts/registry/ENSSubdomainRegistry.sol b/contracts/registry/ENSSubdomainRegistry.sol index e2ba5c4..e47b3fa 100644 --- a/contracts/registry/ENSSubdomainRegistry.sol +++ b/contracts/registry/ENSSubdomainRegistry.sol @@ -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 diff --git a/test/enssubdomainregistry.js b/test/enssubdomainregistry.js index 07117c1..14aba75 100644 --- a/test/enssubdomainregistry.js +++ b/test/enssubdomainregistry.js @@ -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});