Skip to content

Commit

Permalink
permit trycatch
Browse files Browse the repository at this point in the history
  • Loading branch information
wildmolasses committed Apr 9, 2024
1 parent 2ac42a5 commit 1e8c146
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/UniStaker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ contract UniStaker is INotifiableRewardReceiver, Multicall, EIP712, Nonces {
bytes32 _r,
bytes32 _s
) external returns (DepositIdentifier _depositId) {
STAKE_TOKEN.permit(msg.sender, address(this), _amount, _deadline, _v, _r, _s);
try STAKE_TOKEN.permit(msg.sender, address(this), _amount, _deadline, _v, _r, _s) {} catch {};
_depositId = _stake(msg.sender, _amount, _delegatee, _beneficiary);
}

Expand Down Expand Up @@ -383,7 +383,7 @@ contract UniStaker is INotifiableRewardReceiver, Multicall, EIP712, Nonces {
Deposit storage deposit = deposits[_depositId];
_revertIfNotDepositOwner(deposit, msg.sender);

STAKE_TOKEN.permit(msg.sender, address(this), _amount, _deadline, _v, _r, _s);
try STAKE_TOKEN.permit(msg.sender, address(this), _amount, _deadline, _v, _r, _s) {} catch {};
_stakeMore(deposit, _depositId, _amount);
}

Expand Down

0 comments on commit 1e8c146

Please sign in to comment.