difftreelog
fix CrossAccountId sponsoring
in: master
3 files changed
Cargo.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",
pallets/unique/src/eth/sponsoring.rsdiffbeforeafterboth24use up_sponsorship::SponsorshipHandler;24use up_sponsorship::SponsorshipHandler;25use core::marker::PhantomData;25use core::marker::PhantomData;26use core::convert::TryInto;26use core::convert::TryInto;27use up_data_structs::TokenId;27use up_data_structs::{TokenId, CreateItemData, CreateNftData};28use up_evm_mapping::EvmBackwardsAddressMapping;28use up_evm_mapping::EvmBackwardsAddressMapping;29use pallet_common::account::CrossAccountId;29use pallet_common::account::CrossAccountId;303060 let _token_id: TokenId = token_id.try_into().ok()?;60 let _token_id: TokenId = token_id.try_into().ok()?;61 withdraw_create_item::<T>(61 withdraw_create_item::<T>(62 &collection,62 &collection,63 who.as_sub(),63 &who,64 &CreateItemData::NFT(CreateNftData::default()),64 &CreateItemData::NFT(CreateNftData::default()),65 )65 )66 .map(|()| sponsor)66 .map(|()| sponsor)pallets/unique/src/sponsorship.rsdiffbeforeafterboth--- a/pallets/unique/src/sponsorship.rs
+++ b/pallets/unique/src/sponsorship.rs
@@ -246,7 +246,12 @@
..
} => {
let (sponsor, collection) = load(*collection_id)?;
- withdraw_create_item::<T>(&collection, who, data).map(|()| sponsor)
+ withdraw_create_item::<T>(
+ &collection,
+ &T::CrossAccountId::from_sub(who.clone()),
+ data,
+ )
+ .map(|()| sponsor)
}
Call::transfer {
collection_id,