git.delta.rocks / unique-network / refs/commits / 5812736454e2

difftreelog

fix CrossAccountId sponsoring

Yaroslav Bolyukin2022-03-30parent: #3f83595.patch.diff
in: master

3 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8706,13 +8706,10 @@
  "derivative",
  "fp-rpc",
  "fp-self-contained",
- "frame-benchmarking",
  "frame-executive",
  "frame-support",
  "frame-system",
- "frame-system-benchmarking",
  "frame-system-rpc-runtime-api",
- "hex-literal",
  "orml-vesting",
  "pallet-aura",
  "pallet-balances",
modifiedpallets/unique/src/eth/sponsoring.rsdiffbeforeafterboth
--- a/pallets/unique/src/eth/sponsoring.rs
+++ b/pallets/unique/src/eth/sponsoring.rs
@@ -24,7 +24,7 @@
 use up_sponsorship::SponsorshipHandler;
 use core::marker::PhantomData;
 use core::convert::TryInto;
-use up_data_structs::TokenId;
+use up_data_structs::{TokenId, CreateItemData, CreateNftData};
 use up_evm_mapping::EvmBackwardsAddressMapping;
 use pallet_common::account::CrossAccountId;
 
@@ -60,7 +60,7 @@
 						let _token_id: TokenId = token_id.try_into().ok()?;
 						withdraw_create_item::<T>(
 							&collection,
-							who.as_sub(),
+							&who,
 							&CreateItemData::NFT(CreateNftData::default()),
 						)
 						.map(|()| sponsor)
modifiedpallets/unique/src/sponsorship.rsdiffbeforeafterboth
248 let (sponsor, collection) = load(*collection_id)?;248 let (sponsor, collection) = load(*collection_id)?;
249 withdraw_create_item::<T>(&collection, who, data).map(|()| sponsor)249 withdraw_create_item::<T>(
250 &collection,
251 &T::CrossAccountId::from_sub(who.clone()),
252 data,
253 )
254 .map(|()| sponsor)
250 }255 }