git.delta.rocks / unique-network / refs/commits / e476c1671f42

difftreelog

Fix style

str-mv2022-04-08parent: #4fa2f8e.patch.diff
in: master

2 files changed

modifiedpallets/unique/src/sponsorship.rsdiffbeforeafterboth
366 None366 None
367 }367 }
368
369 // // existance check
370 // match collection.mode {
371 // CollectionMode::NFT => <NftTransferBasket<T>>::get(collection.id, token),
372 // CollectionMode::Fungible(_) => {
373 // <FungibleTransferBasket<T>>::get(collection.id, who.as_sub())
374 // }
375 // CollectionMode::ReFungible => {
376 // <ReFungibleTransferBasket<T>>::get((collection.id, token, who.as_sub()))
377 // }
378 // };
379 }368 }
380}369}
381370
modifiedruntime/common/src/runtime_apis.rsdiffbeforeafterboth
1#[macro_export]1#[macro_export]
2macro_rules! impl_common_runtime_apis {2macro_rules! impl_common_runtime_apis {
3 (3 (
4 $(4 $(
5 #![custom_apis]5 #![custom_apis]
10 impl_runtime_apis! {10 impl_runtime_apis! {
11 $($($custom_apis)+)?11 $($($custom_apis)+)?
1212
13 impl up_rpc::UniqueApi<Block, CrossAccountId, AccountId> for Runtime {13 impl up_rpc::UniqueApi<Block, CrossAccountId, AccountId> for Runtime {
14 fn account_tokens(collection: CollectionId, account: CrossAccountId) -> Result<Vec<TokenId>, DispatchError> {14 fn account_tokens(collection: CollectionId, account: CrossAccountId) -> Result<Vec<TokenId>, DispatchError> {
15 dispatch_unique_runtime!(collection.account_tokens(account))15 dispatch_unique_runtime!(collection.account_tokens(account))
16 }16 }
69 fn collection_stats() -> Result<CollectionStats, DispatchError> {69 fn collection_stats() -> Result<CollectionStats, DispatchError> {
70 Ok(<pallet_common::Pallet<Runtime>>::collection_stats())70 Ok(<pallet_common::Pallet<Runtime>>::collection_stats())
71 }71 }
72 fn next_sponsored(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<Option<u64>, DispatchError> {72 fn next_sponsored(collection: CollectionId, account: CrossAccountId, token: TokenId) -> Result<Option<u64>, DispatchError> {
73 Ok(<pallet_unique::UniqueSponsorshipPredict<Runtime> as73 Ok(<pallet_unique::UniqueSponsorshipPredict<Runtime> as
74 pallet_unique::SponsorshipPredict<Runtime>>::predict(74 pallet_unique::SponsorshipPredict<Runtime>>::predict(
75 collection,75 collection,
76 account,76 account,
77 token))77 token))
7878 }
79 fn effective_collection_limits(collection: CollectionId) -> Result<Option<CollectionLimits>, DispatchError> {79
80 Ok(<pallet_common::Pallet<Runtime>>::effective_collection_limits(collection))80 fn effective_collection_limits(collection: CollectionId) -> Result<Option<CollectionLimits>, DispatchError> {
81 }81 Ok(<pallet_common::Pallet<Runtime>>::effective_collection_limits(collection))
82 }82 }
83 }
8384
84 impl sp_api::Core<Block> for Runtime {85 impl sp_api::Core<Block> for Runtime {
85 fn version() -> RuntimeVersion {86 fn version() -> RuntimeVersion {
414 Ok(batches)415 Ok(batches)
415 }416 }
416 }417 }
417 }
418 }418 }
419}419 }
420}
420421