diff --git a/apps/ui/src/composables/useSpaceSettings.ts b/apps/ui/src/composables/useSpaceSettings.ts index bb5fbe0d8..7328a8fe5 100644 --- a/apps/ui/src/composables/useSpaceSettings.ts +++ b/apps/ui/src/composables/useSpaceSettings.ts @@ -722,7 +722,7 @@ export function useSpaceSettings(space: Ref) { members.value = getInitialMembers(space.value); parent.value = space.value.parent?.id ?? ''; children.value = space.value.children.map(child => child.id); - termsOfServices.value = space.value.additionalRawData?.terms ?? ''; + termsOfServices.value = space.value.terms ?? ''; customDomain.value = space.value.additionalRawData?.domain ?? ''; isPrivate.value = space.value.additionalRawData?.private ?? false; } @@ -900,9 +900,7 @@ export function useSpaceSettings(space: Ref) { return; } - if ( - termsOfServicesValue !== (space.value.additionalRawData?.terms ?? '') - ) { + if (termsOfServicesValue !== (space.value.terms ?? '')) { isModified.value = true; return; } diff --git a/apps/ui/src/networks/common/graphqlApi/index.ts b/apps/ui/src/networks/common/graphqlApi/index.ts index c0da8b354..2feb6c602 100644 --- a/apps/ui/src/networks/common/graphqlApi/index.ts +++ b/apps/ui/src/networks/common/graphqlApi/index.ts @@ -182,6 +182,7 @@ function formatSpace( github: space.metadata.github, twitter: space.metadata.twitter, discord: space.metadata.discord, + terms: '', voting_power_symbol: space.metadata.voting_power_symbol, voting_types: constants.EDITOR_VOTING_TYPES, treasuries: space.metadata.treasuries.map(treasury => { diff --git a/apps/ui/src/networks/offchain/api/index.ts b/apps/ui/src/networks/offchain/api/index.ts index 55f5f6cb8..22e669d01 100644 --- a/apps/ui/src/networks/offchain/api/index.ts +++ b/apps/ui/src/networks/offchain/api/index.ts @@ -137,7 +137,6 @@ function formatSpace( const additionalRawData: OffchainAdditionalRawData = { type: 'offchain', - terms: space.terms, private: space.private, domain: space.domain, skin: space.skin, @@ -209,6 +208,7 @@ function formatSpace( voting_power_validation_strategies_parsed_metadata: [], children: space.children.map(formatRelatedSpace), parent: space.parent ? formatRelatedSpace(space.parent) : null, + terms: space.terms, additionalRawData }; } diff --git a/apps/ui/src/networks/offchain/api/types.ts b/apps/ui/src/networks/offchain/api/types.ts index 61e8c31f0..2363fe055 100644 --- a/apps/ui/src/networks/offchain/api/types.ts +++ b/apps/ui/src/networks/offchain/api/types.ts @@ -71,8 +71,8 @@ export type ApiSpace = { followersCount: number; children: [ApiRelatedSpace]; parent: ApiRelatedSpace | null; - // properties used for settings terms: string; + // properties used for settings private: boolean; domain: string | null; skin: string | null; diff --git a/apps/ui/src/types.ts b/apps/ui/src/types.ts index 72e4eaee0..88cd8c5a7 100644 --- a/apps/ui/src/types.ts +++ b/apps/ui/src/types.ts @@ -135,7 +135,6 @@ export type OffchainAdditionalRawData = { type: 'offchain'; } & Pick< OffchainApiSpace, - | 'terms' | 'private' | 'domain' | 'skin' @@ -173,6 +172,7 @@ export type Space = { github: string; discord: string; coingecko?: string; + terms: string; voting_power_symbol: string; controller: string; voting_delay: number; diff --git a/apps/ui/src/views/Create.vue b/apps/ui/src/views/Create.vue index dcbe59f28..609a93b8f 100644 --- a/apps/ui/src/views/Create.vue +++ b/apps/ui/src/views/Create.vue @@ -68,6 +68,7 @@ const metadataForm: SpaceMetadata = reactive( twitter: '', github: '', discord: '', + terms: '', votingPowerSymbol: '', treasuries: [], labels: [],