Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tuminfei committed Jan 11, 2021
1 parent ecbaae5 commit fe00349
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pallets/nft/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ decl_event!(
decl_error! {
pub enum Error for Module<T: Trait> {
NamesNotExists,
SaleOrderNotExists,
NamesOwnerInvalid,
}
}
Expand Down Expand Up @@ -933,6 +934,7 @@ decl_module! {
#[weight = T::WeightInfo::accept_sale_order()]
pub fn accept_sale_order(origin, collection_id: u64, item_id: u64) -> DispatchResult {
let sender = ensure_signed(origin)?;
ensure!(<SaleOrderList<T>>::contains_key(collection_id, item_id), Error::<T>::SaleOrderNotExists);

let target_sale_order = <SaleOrderList<T>>::get(collection_id, item_id);
let nft_owner = target_sale_order.owner;
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("uart"),
impl_name: create_runtime_str!("uart"),
authoring_version: 1,
spec_version: 19,
spec_version: 20,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down

0 comments on commit fe00349

Please sign in to comment.