I have a data structure as follows
// definition for account id is
// pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId;
use primitives::{AccountId, Balance, Price};
#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)]
#[scale_info(skip_type_params(T))]
pub struct Alpha{
pub alpha: AccountId,
pub cost: Price,
}
#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, Default)]
#[scale_info(skip_type_params(T))]
pub struct Wallet{
pub avg: Price,
pub alphas: Vec<Alpha>,
}
and Storage Declaration
#[pallet::storage]
#[pallet::getter(fn get_big_wallet)]
pub type BigWallet<T: Config> = StorageDoubleMap<
_,
Blake2_128Concat,
CurrencyId,
Blake2_128Concat,
RoundNumber,
Wallet,
OptionQuery,
>;
When I tried to save data um getting the following error
let who = ensure_signed(origin)?; // this works
let mut record= Self::get_big_wallet(asset_id, round).unwrap_or_default(); // this works
let mut members= record.alpha;
let sub_len = members.len() as u128;
let data= Alpha{
alpa: who.clone(),
price,
};
Error: alpa: who.clone(),
| ^^^^^^^^^^^ expected struct `AccountId32`, found associated type
How to fix this error above? How to save an account ( who ) ?