Skip to content

Commit

Permalink
feat: making input checks more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Nov 21, 2022
1 parent ad5a824 commit a84f48a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bridges/liquity/TroveBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a84f48a

Please sign in to comment.