Skip to content

Commit

Permalink
add check when converting to stable coin
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcabot committed Nov 10, 2022
1 parent 3a57a42 commit 446378d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contracts/dex/PayDexAMM.sol
Expand Up @@ -126,6 +126,12 @@ abstract contract PayDexAMM is Ownable {
view
returns (uint256)
{
require(
token == wrappedNativeToken ||
token == utilityToken ||
erc20token[token],
"INVALID_TOKEN"
);
return _estimateSwapAmount(token, stableCoin, amount);
}

Expand Down

0 comments on commit 446378d

Please sign in to comment.