From cd6177d59d2a68e5b363277573db786b584abfc1 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Wed, 06 Oct 2021 12:42:19 +0000 Subject: [PATCH] feat: skip transfers with zero value --- --- a/pallets/nft/src/lib.rs +++ b/pallets/nft/src/lib.rs @@ -1354,6 +1354,10 @@ Self::check_white_list(&target_collection, &recipient)?; } + if value == 0 { + return Ok(()) + } + // Reduce approval by transferred amount or remove if remaining approval drops to 0 if approval.saturating_sub(value) > 0 { >::insert(collection_id, (item_id, &from, &sender), approval - value); @@ -2882,4 +2886,4 @@ } } -// #endregion \ No newline at end of file +// #endregion -- gitstuff