Skip to content

Commit

Permalink
Rename getAuthorizedNode to getAuthorisedNode
Browse files Browse the repository at this point in the history
  • Loading branch information
makoto committed Nov 1, 2023
1 parent 093fbd2 commit d07e6d9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions contracts/resolvers/DelegatableResolver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ contract DelegatableResolver is
* @return node The node of the name passed as an argument
* @return authorized The boolean state of whether the operator is approved to update record of the name
*/
function getAuthorizedNode(
function getAuthorisedNode(
bytes memory name,
uint256 offset,
address operator
Expand All @@ -66,7 +66,7 @@ contract DelegatableResolver is
node = bytes32(0);
if (len > 0) {
bytes32 label = name.keccak(offset + 1, len);
(node, authorized) = getAuthorizedNode(
(node, authorized) = getAuthorisedNode(
name,
offset + len + 1,
operator
Expand All @@ -84,7 +84,7 @@ contract DelegatableResolver is
address operator,
bool approved
) external {
(bytes32 node, bool authorized) = getAuthorizedNode(
(bytes32 node, bool authorized) = getAuthorisedNode(
name,
0,
msg.sender
Expand Down
2 changes: 1 addition & 1 deletion contracts/resolvers/IDelegatableResolver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface IDelegatableResolver {
bool approved
) external;

function getAuthorizedNode(
function getAuthorisedNode(
bytes memory name,
uint256 offset,
address operator
Expand Down
12 changes: 6 additions & 6 deletions test/resolvers/TestDelegatableResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ contract('DelegatableResolver', function (accounts) {

it('owner is ahtorised to update any names', async () => {
assert.equal(
(await resolver.getAuthorizedNode(encodeName('a.b.c'), 0, owner))
(await resolver.getAuthorisedNode(encodeName('a.b.c'), 0, owner))
.authorized,
true,
)
assert.equal(
(await resolver.getAuthorizedNode(encodeName('x.y.z'), 0, owner))
(await resolver.getAuthorisedNode(encodeName('x.y.z'), 0, owner))
.authorized,
true,
)
Expand All @@ -94,11 +94,11 @@ contract('DelegatableResolver', function (accounts) {
it('approves multiple users', async () => {
await resolver.approve(encodedname, operator, true, { from: owner })
await resolver.approve(encodedname, operator2, true, { from: owner })
const result = await resolver.getAuthorizedNode(encodedname, 0, operator)
const result = await resolver.getAuthorisedNode(encodedname, 0, operator)
assert.equal(result.node, node)
assert.equal(result.authorized, true)
assert.equal(
(await resolver.getAuthorizedNode(encodedname, 0, operator2))
(await resolver.getAuthorisedNode(encodedname, 0, operator2))
.authorized,
true,
)
Expand All @@ -124,14 +124,14 @@ contract('DelegatableResolver', function (accounts) {
await resolver.approve(encodeName(subname), operator, true, {
from: owner,
})
const result = await resolver.getAuthorizedNode(
const result = await resolver.getAuthorisedNode(
encodeName(subname),
0,
operator,
)
assert.equal(result.node, namehash(subname))
assert.equal(result.authorized, true)
const result2 = await resolver.getAuthorizedNode(
const result2 = await resolver.getAuthorisedNode(
encodeName(parentname),
0,
operator,
Expand Down

0 comments on commit d07e6d9

Please sign in to comment.