Skip to content

Commit

Permalink
fix : reusing secrets with claim of different nonce
Browse files Browse the repository at this point in the history
  • Loading branch information
yash1io committed Mar 14, 2024
1 parent e60f4be commit 8bae8b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/fee/FeeAccount.sol
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ contract FeeAccount is EIP712Upgradeable {

uint256 localSecretsProvided = 0;
for (uint256 i = 0; i < htlcs.length; i++) {
if (!secretsClaimed[secrets[i]]) {
if (!(secretsClaimed[secrets[i]] && nonce == nonce_)) {
if (htlcs[i].expiry > block.number && sha256(secrets[i]) == htlcs[i].secretHash) {
localSecretsProvided++;
secretsClaimed[secrets[i]] = true;
Expand Down

0 comments on commit 8bae8b4

Please sign in to comment.