Skip to content

Commit

Permalink
code de-nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
psorinionut committed Jan 13, 2023
1 parent 80dd169 commit 8ff40a7
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions esdt-nft-marketplace/src/token_distribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ pub trait TokenDistributionModule:
let amount = self
.claimable_amount(&caller, &token_id, token_nonce)
.take();

if amount > 0 {
if token_id.is_egld() {
egld_payment_amount = amount;
} else {
output_payments.push(EsdtTokenPayment::new(
token_id.unwrap_esdt(),
token_nonce,
amount,
));
}
if amount == 0 {
continue;
}
if token_id.is_egld() {
egld_payment_amount = amount;
} else {
output_payments.push(EsdtTokenPayment::new(
token_id.unwrap_esdt(),
token_nonce,
amount,
));
}
}

Expand Down

0 comments on commit 8ff40a7

Please sign in to comment.