From 8ff40a75d9c8159d3c412607836613f69fdcfd70 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Fri, 13 Jan 2023 12:32:43 +0200 Subject: [PATCH] code de-nesting --- .../src/token_distribution.rs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/esdt-nft-marketplace/src/token_distribution.rs b/esdt-nft-marketplace/src/token_distribution.rs index fbbd858..43ac8d1 100644 --- a/esdt-nft-marketplace/src/token_distribution.rs +++ b/esdt-nft-marketplace/src/token_distribution.rs @@ -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, + )); } }