From 482bea1c8488d33bc7baa563614eeacaf4874d9a Mon Sep 17 00:00:00 2001 From: cuteolaf Date: Wed, 1 Mar 2023 13:51:11 -0800 Subject: [PATCH] add account_id into tenant struct --- pallets/tenancy/src/types.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pallets/tenancy/src/types.rs b/pallets/tenancy/src/types.rs index cbc64dea..de6cad34 100644 --- a/pallets/tenancy/src/types.rs +++ b/pallets/tenancy/src/types.rs @@ -30,6 +30,8 @@ pub type BalanceOf = #[scale_info(skip_type_params(T))] #[cfg_attr(feature = "std", derive(Debug))] pub struct RegisteredTenant { + /// account id + pub account_id: T::AccountId, ///infos pub infos: Box>, ///Creation Blocknumber @@ -43,10 +45,14 @@ impl RegisteredTenant { tenant_id: T::AccountId, infos: Box>, asset_requested: Option, - ) -> DispatchResult { let registered_at_block = >::block_number(); - let tenant = RegisteredTenant:: { infos, registered_at_block,asset_requested}; + let tenant = RegisteredTenant:: { + account_id: tenant_id.clone(), + infos, + registered_at_block, + asset_requested, + }; Tenants::::insert(tenant_id.clone(), tenant); Roles::TenantLog::::mutate(tenant_id, |val| { let mut val0 = val.clone().unwrap();