From 390f3c2c3c2c40c8075470265966067f15632791 Mon Sep 17 00:00:00 2001 From: bmacer Date: Fri, 22 Apr 2022 15:32:00 -0400 Subject: [PATCH] change to drain_prefix for nft_burn --- pallets/rmrk-core/src/functions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/rmrk-core/src/functions.rs b/pallets/rmrk-core/src/functions.rs index c0a1d015..eb542be0 100644 --- a/pallets/rmrk-core/src/functions.rs +++ b/pallets/rmrk-core/src/functions.rs @@ -320,7 +320,7 @@ where for _ in Resources::::drain_prefix((collection_id, nft_id)) {} for ((child_collection_id, child_nft_id), _) in Children::::iter_prefix((collection_id, nft_id,)) { - Pallet::::remove_child((collection_id, nft_id), (child_collection_id, child_nft_id)); + for _ in Children::::drain_prefix((collection_id, nft_id)) {} Self::nft_burn(child_collection_id, child_nft_id, max_recursions - 1)?; }