Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
amarinkovic committed May 12, 2023
1 parent 27ea0ad commit d71f5b1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/diamonds/nayms/libs/LibEntity.sol
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ library LibEntity {
emit SimplePolicyCreated(_policyId, _entityId);
}

function getSignerLedgerFallback(bytes32 signingHash, bytes memory signature) private returns(address) {
function getSignerLedgerFallback(bytes32 signingHash, bytes memory signature) private returns (address) {
bytes32 r;
bytes32 s;
uint8 v;

// ecrecover takes the signature parameters, and the only way to get them
if (signature.length == 65) {
// currently is to use assembly.
Expand Down
8 changes: 4 additions & 4 deletions test/T04Entity.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1003,10 +1003,10 @@ contract T04EntityTest is D03ProtocolDefaults {

bytes memory signature = hex"d5a743f1c5cc37c2f509ab4d23eb052fe3dc56db8131364657148b8c1a0a84973c472c9235f5d5508c23c0b2b95c6666186a5038c84676bf384ba1efe438443801";

bytes32 r; // 0xd5a743f1c5cc37c2f509ab4d23eb052fe3dc56db8131364657148b8c1a0a8497
bytes32 s; // 0x3c472c9235f5d5508c23c0b2b95c6666186a5038c84676bf384ba1efe4384438
uint8 v; // 0x1c => 28
bytes32 r; // 0xd5a743f1c5cc37c2f509ab4d23eb052fe3dc56db8131364657148b8c1a0a8497
bytes32 s; // 0x3c472c9235f5d5508c23c0b2b95c6666186a5038c84676bf384ba1efe4384438
uint8 v; // 0x1c => 28

// ecrecover takes the signature parameters, and the only way to get them
if (signature.length == 65) {
// currently is to use assembly.
Expand Down
5 changes: 2 additions & 3 deletions test/T05TokenWrapper.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,18 @@ contract T05TokenWrapper is D03ProtocolDefaults {
vm.startPrank(signer1);
wrapper.increaseAllowance(account0, type(uint256).max);
assertEq(wrapper.allowance(signer1, account0), type(uint256).max, "allowance should have increased");

vm.expectRevert("ERC20: allowance overflow");
wrapper.increaseAllowance(account0, 1);
vm.stopPrank();

vm.startPrank(signer1);
wrapper.decreaseAllowance(account0, type(uint256).max);
assertEq(wrapper.allowance(signer1, account0), 0, "allowance should have decreased");

vm.expectRevert("ERC20: decreased allowance below zero");
wrapper.decreaseAllowance(account0, 1);
vm.stopPrank();

}

function testPermit() public {
Expand Down

0 comments on commit d71f5b1

Please sign in to comment.