From a5e777ffcd7c5e9127fbbcfbdfa2d7083fcd799c Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Thu, 04 Nov 2021 15:15:36 +0000 Subject: [PATCH] fix(fungible): mint resets total supply --- --- a/pallets/fungible/src/lib.rs +++ b/pallets/fungible/src/lib.rs @@ -235,7 +235,9 @@ let total_supply = data .iter() .map(|u| u.1) - .try_fold(0u128, |acc, v| acc.checked_add(v)) + .try_fold(>::get(collection.id), |acc, v| { + acc.checked_add(v) + }) .ok_or(ArithmeticError::Overflow)?; for (user, amount) in data.into_iter() { -- gitstuff