Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ contract CrossChainMasterStrategy is
uint256 _amount
) external override onlyVault nonReentrant {
require(_recipient == vaultAddress, "Only Vault can withdraw");

_withdraw(_asset, _recipient, _amount);
_withdraw(_asset, _amount);
}

/// @inheritdoc InitializableAbstractStrategy
Expand All @@ -107,7 +106,6 @@ contract CrossChainMasterStrategy is

_withdraw(
usdcToken,
vaultAddress,
_remoteBalance > MAX_TRANSFER_AMOUNT
? MAX_TRANSFER_AMOUNT
: _remoteBalance
Expand Down Expand Up @@ -249,18 +247,12 @@ contract CrossChainMasterStrategy is
/**
* @dev Send a withdraw request to the remote strategy
* @param _asset Address of the asset to withdraw
* @param _recipient Address to receive the withdrawn asset
* @param _amount Amount of the asset to withdraw
*/
function _withdraw(
address _asset,
address _recipient,
uint256 _amount
) internal virtual {
function _withdraw(address _asset, uint256 _amount) internal virtual {
require(_asset == usdcToken, "Unsupported asset");
// Withdraw at least 1 USDC
require(_amount > 1e6, "Withdraw amount too small");
require(_recipient == vaultAddress, "Only Vault can withdraw");
require(
_amount <= remoteStrategyBalance,
"Withdraw amount exceeds remote strategy balance"
Expand Down