Skip to content
Merged
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 @@ -101,8 +101,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 @@ -121,8 +120,6 @@ contract CrossChainMasterStrategy is

_withdraw(
usdcToken,
vaultAddress,
// Withdraw at most the max transfer amount
_remoteBalance > MAX_TRANSFER_AMOUNT
? MAX_TRANSFER_AMOUNT
: _remoteBalance
Expand Down Expand Up @@ -264,18 +261,17 @@ 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
<<<<<<< HEAD
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I force pushed this fix and github hasn't picked up on it. This didn't land into the base branch

require(_amount > 1e6, "Withdraw amount too small");
=======
require(_amount >= 1e6, "Withdraw amount too small");
require(_recipient == vaultAddress, "Only Vault can withdraw");
>>>>>>> origin/shah/cross-chain-strategy-cctpv2
require(
_amount <= remoteStrategyBalance,
"Withdraw amount exceeds remote strategy balance"
Expand Down
Loading