Skip to content

Commit

Permalink
fix: nft permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
sirpy committed Nov 3, 2024
1 parent eab546e commit 55fc34b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ contract DirectPaymentsFactory is AccessControlUpgradeable, UUPSUpgradeable {
pool = DirectPaymentsPool(address(new ERC1967Proxy(impl.implementation(), initCall)));
}

nft.grantRole(nft.getManagerRole(nextNftType), _settings.manager);
nft.grantRole(nft.getManagerRole(nextNftType), address(pool));

//access control to project is determinted by the first pool access control rules
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('DirectPaymentsFactory', () => {
expect(await factory.hasRole(factory.DEFAULT_ADMIN_ROLE(), signer.address)).to.be.true;

expect(await nft.hasRole(nft.DEFAULT_ADMIN_ROLE(), signer.address)).to.be.true;
expect(await nft.hasRole(await nft.getManagerRole('1'), signers[1].address)).to.be.true;
expect(await nft.hasRole(await nft.getManagerRole('1'), signers[1].address)).to.be.false;
expect(await nft.hasRole(await nft.getManagerRole('1'), pool.address)).to.be.true;

expect(await pool.hasRole(pool.DEFAULT_ADMIN_ROLE(), signer.address)).to.be.true;
Expand Down

0 comments on commit 55fc34b

Please sign in to comment.