Skip to content

Commit

Permalink
Merge pull request #38 from ElrondNetwork/new-requirements
Browse files Browse the repository at this point in the history
additional check against nfts in liquidity pools
  • Loading branch information
claudiulataretu authored Apr 26, 2021
2 parents b143b57 + 876c934 commit bdadaaf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions elrond_dex_pair/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ pub trait Pair {
#[payment] payment: BigUint,
) -> SCResult<()> {
require!(self.is_active(), "Not active");
require!(
self.call_value().esdt_token_nonce() == 0,
"Only fungible tokens are accepted in liquidity pools"
);
require!(
payment > 0,
"PAIR: Funds transfer must be a positive number"
Expand Down

0 comments on commit bdadaaf

Please sign in to comment.