Skip to content

Commit 9db7964

Browse files
authored
[OUSD-15] Emit event when withdrawAll is skipped (#2781)
1 parent e3d3633 commit 9db7964

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contracts/contracts/strategies/crosschain/CrossChainMasterStrategy.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ contract CrossChainMasterStrategy is
3636

3737
event RemoteStrategyBalanceUpdated(uint256 balance);
3838
event WithdrawRequested(address indexed asset, uint256 amount);
39+
event WithdrawAllSkipped();
3940
event BalanceCheckIgnored(uint64 nonce, uint256 timestamp, bool isTooOld);
4041

4142
/**
@@ -115,6 +116,9 @@ contract CrossChainMasterStrategy is
115116
function withdrawAll() external override onlyVaultOrGovernor nonReentrant {
116117
if (isTransferPending()) {
117118
// Do nothing if there is a pending transfer
119+
// Note: We never want withdrawAll to fail, so
120+
// emit an event to indicate that the withdrawal was skipped
121+
emit WithdrawAllSkipped();
118122
return;
119123
}
120124

0 commit comments

Comments
 (0)