git.delta.rocks / unique-network / refs/commits / 91fceee270b1

difftreelog

fix clean sponsoring basket after item is burned

Yaroslav Bolyukin2021-02-25parent: #e9c5c5e.patch.diff
in: master

1 file changed

modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
1788 // Burn the token completely if this was the last (only) owner1788 // Burn the token completely if this was the last (only) owner
1789 if owner_count == 0 {1789 if owner_count == 0 {
1790 <ReFungibleItemList<T>>::remove(collection_id, item_id);1790 <ReFungibleItemList<T>>::remove(collection_id, item_id);
1791 <VariableMetaDataBasket<T>>::remove(collection_id, item_id);
1791 }1792 }
1792 else {1793 else {
1793 <ReFungibleItemList<T>>::insert(collection_id, item_id, token);1794 <ReFungibleItemList<T>>::insert(collection_id, item_id, token);
1810 .ok_or(Error::<T>::NumOverflow)?;1811 .ok_or(Error::<T>::NumOverflow)?;
1811 <Balance<T>>::insert(collection_id, item.owner.clone(), new_balance);1812 <Balance<T>>::insert(collection_id, item.owner.clone(), new_balance);
1812 <NftItemList<T>>::remove(collection_id, item_id);1813 <NftItemList<T>>::remove(collection_id, item_id);
1814 <VariableMetaDataBasket<T>>::remove(collection_id, item_id);
18131815
1814 Ok(())1816 Ok(())
1815 }1817 }