We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e68ccf1 commit c1a2738Copy full SHA for c1a2738
contracts/protocol/libraries/logic/MarketplaceLogic.sol
@@ -635,11 +635,12 @@ library MarketplaceLogic {
635
);
636
DataTypes.ReserveData storage reserve = ps._reserves[vars.creditToken];
637
vars.creditXTokenAddress = reserve.xTokenAddress;
638
- // either the buyer decided to not use any credit
+ // either the seller & buyer decided to not use any credit
639
// OR
640
// the creditToken must be listed since otherwise cannot borrow from the pool
641
require(
642
- vars.creditAmount == 0 || vars.creditXTokenAddress != address(0),
+ (vars.creditAmount == 0 && vars.supplyAmount == 0) ||
643
+ vars.creditXTokenAddress != address(0),
644
Errors.ASSET_NOT_LISTED
645
646
}
0 commit comments