Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/credebl/studio into merg…
Browse files Browse the repository at this point in the history
…e/dev-to-qa-10-july

Signed-off-by: pranalidhanavade <[email protected]>
  • Loading branch information
pranalidhanavade committed Jul 10, 2024
2 parents 2ffdbaa + 1f4d3bc commit 5e79fe3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/api/ecosystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 8 additions & 4 deletions src/components/Resources/Schema/Create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
{
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/components/organization/interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ export interface IFormikValues {
privatekey: string;
endorserDid: string;
}

export interface IDedicatedAgentConfig {
walletName: string;
agentEndpoint: string;
Expand Down Expand Up @@ -249,6 +250,7 @@ export interface ILedgerItem {
deletedAt: string | null;
}


export interface IOrgCount {
verificationRecordsCount: number;
connectionRecordsCount: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import DedicatedAgentForm from '../walletCommonComponents/DedicatedAgent';
import SharedAgentForm from './SharedAgent';
import WalletSteps from './WalletSteps';
import type { IValuesShared } from './interfaces';
import React from 'react';
import OrganizationDetails from '../OrganizationDetails';
import type { Organisation } from '../interfaces';

Expand Down Expand Up @@ -48,6 +49,7 @@ const WalletSpinup = (props: {
const [isShared, setIsShared] = useState<boolean>(false);
const [isConfiguredDedicated, setIsConfiguredDedicated] = useState<boolean>(false);


const maskSeeds = (seed: string) => {
const visiblePart = seed.slice(0, -10);
const maskedPart = seed.slice(-10).replace(/./g, '*');
Expand All @@ -67,6 +69,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)
Expand All @@ -88,7 +91,6 @@ const WalletSpinup = (props: {
useEffect(() => {
fetchOrganizationDetails()
}, []);


const onRadioSelect = (type: string) => {
setAgentType(type);
Expand Down

0 comments on commit 5e79fe3

Please sign in to comment.