Skip to content

Commit

Permalink
additional check against nfts in liquidity pools
Browse files Browse the repository at this point in the history
  • Loading branch information
catalinnnn committed Apr 26, 2021
1 parent 2e9b030 commit 876c934
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 876c934

Please sign in to comment.