Skip to content

Commit

Permalink
Merge pull request #782 from lukso-network/update-isValidNonce
Browse files Browse the repository at this point in the history
refactor: [I-02] Update is valid nonce
  • Loading branch information
CJ42 authored Nov 1, 2023
2 parents df653c4 + 2f1c4da commit 34fb918
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions contracts/LSP25ExecuteRelayCall/LSP25MultiChannelNonce.sol
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ abstract contract LSP25MultiChannelNonce {
address from,
uint256 idx
) internal view virtual returns (bool) {
uint256 mask = ~uint128(0);
// Alternatively:
// uint256 mask = (1<<128)-1;
// uint256 mask = 0xffffffffffffffffffffffffffffffff;
return (idx & mask) == _nonceStore[from][idx >> 128];
return uint128(idx) == _nonceStore[from][idx >> 128];
}
}
2 changes: 1 addition & 1 deletion contracts/LSP6KeyManager/LSP6KeyManagerCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ abstract contract LSP6KeyManagerCore is
revert ERC725X_ExecuteParametersEmptyArray();
}

for (uint256 ii = 0; ii < operationTypes.length; ii++) {
for (uint256 ii; ii < operationTypes.length; ii++) {
LSP6ExecuteModule._verifyCanExecute(
targetContract,
from,
Expand Down

0 comments on commit 34fb918

Please sign in to comment.