Skip to content

Commit

Permalink
make _typehashes & _domains private
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed Feb 12, 2021
1 parent 3a1fed9 commit df6d730
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
4 changes: 2 additions & 2 deletions contracts/metatx/Forwarder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ contract Forwarder is IForwarder {
bytes32 private constant _EIP721DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

mapping(address => Counters.Counter) private _nonces;
mapping(bytes32 => bool) public _typeHashes;
mapping(bytes32 => bool) public _domains;
mapping(bytes32 => bool) private _typeHashes;
mapping(bytes32 => bool) private _domains;

event RequestTypeRegistered(bytes32 indexed typeHash, string typeStr);
event DomainRegistered(bytes32 indexed domainSeparator, bytes domainValue);
Expand Down
10 changes: 0 additions & 10 deletions test/metatx/Forwarder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@ contract('GSNRecipient', function (accounts) {
expect(await this.recipient.isTrustedForwarder(this.forwarder.address));
});

context('configuration', function () {
it('domainSeparator whitelisted', async function () {
expect(await this.forwarder._domains(this.domainSeparator)).to.be.equal(true);
});

it('typeHash whitelisted', async function () {
expect(await this.forwarder._typeHashes(this.requestTypeHash)).to.be.equal(true);
});
});

context('when called directly', function () {
beforeEach(async function () {
this.context = this.recipient; // The Context behavior expects the contract in this.context
Expand Down

0 comments on commit df6d730

Please sign in to comment.