Skip to content

Commit

Permalink
Merge pull request #51 from ShaheenRehman/master
Browse files Browse the repository at this point in the history
Update GuardV3.sol
  • Loading branch information
xiaoch05 authored Jan 6, 2024
2 parents b34abef + 857d108 commit 3fc4241
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helix-contract/contracts/mapping-token/v3/GuardV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ contract GuardV3 is GuardRegistryV3, Pausable {
) internal {
require(hash(abi.encodePacked(from, timestamp, token, recipient, amount)) == deposits[id], "Guard: Invalid id to claim");
require(amount > 0, "Guard: Invalid amount to claim");
delete deposits[id];
if (isNative) {
require(IERC20(token).transferFrom(from, address(this), amount), "Guard: claim native token failed");
uint256 balanceBefore = address(this).balance;
Expand All @@ -94,7 +95,6 @@ contract GuardV3 is GuardRegistryV3, Pausable {
} else {
require(IERC20(token).transferFrom(from, recipient, amount), "Guard: claim token failed");
}
delete deposits[id];
emit TokenClaimed(id);
}

Expand Down

0 comments on commit 3fc4241

Please sign in to comment.