difftreelog
Fix build
in: master
1 file changed
pallets/nft/src/lib.rsdiffbeforeafterboth587 let current_index = <ItemListIndex>::get(item.collection)587 let current_index = <ItemListIndex>::get(item.collection)588 .checked_add(1)588 .checked_add(1)589 .expect("Item list index id error");589 .expect("Item list index id error");590 let itemcopy = item.clone();590591591 let value = item.owner.first().unwrap().fraction as u64;592 let value = item.owner.first().unwrap().fraction as u64;592 let owner = item.owner.first().unwrap().owner.clone();593 let owner = item.owner.first().unwrap().owner.clone();597 <ReFungibleItemList<T>>::insert(item.collection, current_index, item); 598 <ReFungibleItemList<T>>::insert(item.collection, current_index, item); 598 599 599 // Update balance600 // Update balance600 let new_balance = <Balance<T>>::get(item.collection, owner.clone()).checked_add(value).unwrap();601 let new_balance = <Balance<T>>::get(itemcopy.collection, owner.clone()).checked_add(value).unwrap();601 <Balance<T>>::insert(item.collection, owner.clone(), new_balance);602 <Balance<T>>::insert(itemcopy.collection, owner.clone(), new_balance);602603603 Ok(())604 Ok(())604 }605 }677 let current_index = <ItemListIndex>::get(item.collection)678 let current_index = <ItemListIndex>::get(item.collection)678 .checked_add(1)679 .checked_add(1)679 .expect("Item list index id error");680 .expect("Item list index id error");681 let itemcopy = item.clone();680682681 Self::add_token_index(item.collection, current_index, item.owner.clone())?;683 Self::add_token_index(item.collection, current_index, item.owner.clone())?;682684683 <ItemListIndex>::insert(item.collection, current_index);685 <ItemListIndex>::insert(item.collection, current_index);684 <NftItemList<T>>::insert(item.collection, current_index, item);686 <NftItemList<T>>::insert(item.collection, current_index, item);685687686 // Update balance688 // Update balance687 let new_balance = <Balance<T>>::get(item.collection, item.owner.clone()).checked_add(1).unwrap();689 let new_balance = <Balance<T>>::get(itemcopy.collection, itemcopy.owner.clone()).checked_add(1).unwrap();688 <Balance<T>>::insert(item.collection_id, item.owner.clone(), new_balance);690 <Balance<T>>::insert(itemcopy.collection, itemcopy.owner.clone(), new_balance);689691690 Ok(())692 Ok(())691 }693 }