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

View File

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