diff --git a/src/api/ecosystem.ts b/src/api/ecosystem.ts index 47035d566..6bb1d6c2e 100644 --- a/src/api/ecosystem.ts +++ b/src/api/ecosystem.ts @@ -110,11 +110,10 @@ export const getEndorsementList = async ( export const createSchemaRequest = async ( data: object, - schemaType: string, endorsementId: string, orgId: string, ) => { - const url = `${apiRoutes.Ecosystem.root}/${endorsementId}/${orgId}${apiRoutes.Ecosystem.endorsements.createSchemaRequest}?schemaType=${schemaType}`; + const url = `${apiRoutes.Ecosystem.root}/${endorsementId}/${orgId}${apiRoutes.Ecosystem.endorsements.createSchemaRequest}`; const payload = data; const axiosPayload = { url, diff --git a/src/components/Resources/Schema/Create.tsx b/src/components/Resources/Schema/Create.tsx index e3ef1174d..5ed1c5957 100644 --- a/src/components/Resources/Schema/Create.tsx +++ b/src/components/Resources/Schema/Create.tsx @@ -23,6 +23,7 @@ import { createSchemaRequest } from '../../../api/ecosystem'; import EcosystemProfileCard from '../../../commonComponents/EcosystemProfileCard'; import ConfirmationModal from '../../../commonComponents/ConfirmationModal'; import { SchemaType } from '../../../common/enums'; +import React from 'react'; const options = [ { @@ -157,14 +158,17 @@ const CreateSchema = () => { setCreateLoader(true); const schemaFieldName = { endorse: true, - attributes: values.attribute, - version: values.schemaVersion, - name: values.schemaName, + type: SchemaType.INDY, + schemaPayload: { + schemaVersion: values.schemaVersion, + schemaName: values.schemaName, + attributes: values.attribute + }, }; const id = await getEcosystemId(); - const createSchema = await createSchemaRequest(schemaFieldName, SchemaType.INDY, id, orgId); + const createSchema = await createSchemaRequest(schemaFieldName, id, orgId); const { data } = createSchema as AxiosResponse; if (data?.statusCode === apiStatusCodes.API_STATUS_CREATED) { setSuccess(data?.message); diff --git a/src/components/organization/interfaces/index.ts b/src/components/organization/interfaces/index.ts index 166bdc131..361783e73 100644 --- a/src/components/organization/interfaces/index.ts +++ b/src/components/organization/interfaces/index.ts @@ -275,4 +275,4 @@ export interface ILedgerItem { ecosystemId: string; ecosystemRoleId: string; ecosystemRole: IEcosystemRole; - } + } \ No newline at end of file diff --git a/src/components/organization/walletCommonComponents/WalletSpinup.tsx b/src/components/organization/walletCommonComponents/WalletSpinup.tsx index 091958633..8b2d7e195 100644 --- a/src/components/organization/walletCommonComponents/WalletSpinup.tsx +++ b/src/components/organization/walletCommonComponents/WalletSpinup.tsx @@ -3,6 +3,7 @@ import { getFromLocalStorage } from '../../../api/Auth'; import { createDid, getOrganizationById, + spinupDedicatedAgent, spinupSharedAgent, } from '../../../api/organization'; import { useEffect, useState } from 'react'; @@ -47,7 +48,7 @@ const WalletSpinup = (props: { const [orgData, setOrgData] = useState(null); const [isShared, setIsShared] = useState(false); const [isConfiguredDedicated, setIsConfiguredDedicated] = useState(false); - + const maskSeeds = (seed: string) => { const visiblePart = seed.slice(0, -10); const maskedPart = seed.slice(-10).replace(/./g, '*'); @@ -67,6 +68,7 @@ const WalletSpinup = (props: { const fetchOrganizationDetails = async () => { setLoading(true); const orgId = await getFromLocalStorage(storageKeys.ORG_ID); + const orgInfoData = await getFromLocalStorage(storageKeys.ORG_INFO); const response = await getOrganizationById(orgId as string); const { data } = response as AxiosResponse; setLoading(false) @@ -89,7 +91,6 @@ const WalletSpinup = (props: { fetchOrganizationDetails() }, []); - const onRadioSelect = (type: string) => { setAgentType(type); };