Skip to content

Commit

Permalink
add sale history vec
Browse files Browse the repository at this point in the history
  • Loading branch information
tuminfei committed Dec 21, 2020
1 parent 25ec54f commit 50b9b87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions pallets/nft/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use sp_runtime::{
FixedPointOperand, FixedU128,
};
use sp_std::prelude::*;
use core::convert::TryInto;

mod default_weight;

Expand Down Expand Up @@ -856,7 +855,7 @@ decl_module! {

let target_collection = <Collection<T>>::get(collection_id);
let locker = Self::nft_account_id();
let balance_price = CurrencyBalanceOf::<T>::from(price.try_into().unwrap());
let balance_price = CurrencyBalanceOf::<T>::saturated_from(price.into());

// Moves funds from buyer account into the owner's account
// We don't use T::Currency::transfer() to prevent fees being incurred.
Expand All @@ -872,7 +871,7 @@ decl_module! {
// Moves nft from locker account into the buyer's account
match target_collection.mode
{
CollectionMode::NFT(_) => Self::transfer_nft(collection_id, item_id, locker, c.clone())?,
CollectionMode::NFT(_) => Self::transfer_nft(collection_id, item_id, locker, sender.clone())?,
CollectionMode::Fungible(_) => Self::transfer_fungible(collection_id, item_id, target_sale_order.value, locker, sender.clone())?,
CollectionMode::ReFungible(_, _) => Self::transfer_refungible(collection_id, item_id, target_sale_order.value, locker, sender.clone())?,
_ => ()
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("uart"),
impl_name: create_runtime_str!("uart"),
authoring_version: 1,
spec_version: 11,
spec_version: 12,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down

0 comments on commit 50b9b87

Please sign in to comment.