Skip to content

Commit

Permalink
removed extra function
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvolear committed Apr 10, 2024
1 parent 36e9b39 commit 8198141
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions contracts/registration/Registration.sol
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,6 @@ contract Registration is OwnableUpgradeable, PoseidonSMT, TSSSigner {
delete passportDispatchers[dispatcherType_];
}

function getDispatcher(bytes32 dispatcherType_) external view returns (address) {
return address(passportDispatchers[dispatcherType_]);
}

function getPassportInfo(
bytes32 passportKey_
)
Expand Down
4 changes: 2 additions & 2 deletions test/registration/Registration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ describe("Registration", () => {
it("should add and remove dispatchers", async () => {
const someType = ethers.randomBytes(32);

expect(await registration.getDispatcher(someType)).to.equal(ZERO_ADDR);
expect(await registration.passportDispatchers(someType)).to.equal(ZERO_ADDR);

await registration.addDispatcher(someType, SIGNER.address);

expect(registration.addDispatcher(someType, SIGNER.address)).to.be.revertedWith(
"Registration: dispatcher already exists",
);
expect(await registration.getDispatcher(someType)).to.equal(SIGNER.address);
expect(await registration.passportDispatchers(someType)).to.equal(SIGNER.address);
});

it("should not be called by not owner", async () => {
Expand Down

0 comments on commit 8198141

Please sign in to comment.