From a84f48a988fcbdda98a586f84b7248a54bada6a3 Mon Sep 17 00:00:00 2001 From: benesjan Date: Mon, 21 Nov 2022 13:33:25 -0600 Subject: [PATCH] feat: making input checks more explicit --- src/bridges/liquity/TroveBridge.sol | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bridges/liquity/TroveBridge.sol b/src/bridges/liquity/TroveBridge.sol index 3c6376d73..81e519440 100644 --- a/src/bridges/liquity/TroveBridge.sol +++ b/src/bridges/liquity/TroveBridge.sol @@ -214,6 +214,7 @@ contract TroveBridge is BridgeBase, ERC20, Ownable, IUniswapV3SwapCallback { if ( _inputAssetA.assetType == AztecTypes.AztecAssetType.ETH && + _inputAssetB.assetType == AztecTypes.AztecAssetType.NOT_USED && _outputAssetA.erc20Address == address(this) && _outputAssetB.erc20Address == LUSD ) { @@ -248,7 +249,10 @@ contract TroveBridge is BridgeBase, ERC20, Ownable, IUniswapV3SwapCallback { } subsidyCriteria = 1; } else if ( - _inputAssetA.erc20Address == address(this) && _outputAssetA.assetType == AztecTypes.AztecAssetType.ETH + _inputAssetA.erc20Address == address(this) && + _inputAssetB.assetType == AztecTypes.AztecAssetType.NOT_USED && + _outputAssetA.assetType == AztecTypes.AztecAssetType.ETH && + _outputAssetB.assetType == AztecTypes.AztecAssetType.NOT_USED ) { if (troveStatus == Status.active) { // Repaying debt with collateral (using flash swaps)