Skip to content

Commit fb76e1c

Browse files
committed
chore: remove sweeping balance to paymaster
1 parent d3f41aa commit fb76e1c

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ build-sizes: ## Builds the project and shows sizes
119119

120120
.PHONY: test-vvv
121121
test-vvv: ## Runs tests with verbose output
122-
forge test --match-test test_crossChainRebalance_updateSuperformData_allErrors --evm-version cancun
122+
forge test --match-contract SuperformRouterPlusTest --evm-version cancun
123123

124124
.PHONY: ftest
125125
ftest: ## Runs tests with cancun evm version

src/router-plus/SuperformRouterPlusAsync.sol

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -263,16 +263,7 @@ contract SuperformRouterPlusAsync is ISuperformRouterPlusAsync, BaseSuperformRou
263263
/// This means that at most, expectedAmountInterimAsset can be sent as external token and the rebalanceToSfData
264264
/// information in amounts/outputAmounts should have that reflected from the get go in the first step
265265
vars.interimAsset = IERC20(data.interimAsset);
266-
267-
if (vars.balanceOfInterim > data.expectedAmountInterimAsset) {
268-
vars.amountToDeposit = data.expectedAmountInterimAsset;
269-
/// @dev transfer the remaining balance to the paymaster
270-
vars.interimAsset.safeTransfer(
271-
_getAddress(keccak256("PAYMASTER")), vars.balanceOfInterim - vars.amountToDeposit
272-
);
273-
} else {
274-
vars.amountToDeposit = vars.balanceOfInterim;
275-
}
266+
vars.amountToDeposit = data.expectedAmountInterimAsset;
276267

277268
/// @dev validate the update of txData by the keeper and re-construct calldata
278269
/// @notice if there is any failure here because of rebalanceToData misconfiguration a refund should be

0 commit comments

Comments
 (0)