8000 fix: All schema by ledger by nishad-ayanworks · Pull Request #487 · credebl/studio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: All schema by ledger #487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/api/Schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import { storageKeys } from "../config/CommonConstant";

export const getAllSchemas = async ({itemPerPage, page, allSearch }: GetAllSchemaListParameter) => {
const token = await getFromLocalStorage(storageKeys.TOKEN)
const ledgerId = await getFromLocalStorage(storageKeys.LEDGER_ID)

const details = {
url: `${apiRoutes.Platform.getAllSchemaFromPlatform}?pageSize=${itemPerPage}&searchByText=${allSearch}&pageNumber=${page}`,
url: `${apiRoutes.Platform.getAllSchemaFromPlatform}?pageSize=${itemPerPage}&searchByText=${allSearch}&pageNumber=${page}&ledgerId=${ledgerId}`,
config: {
headers: {
'Content-type': 'application/json',
Expand Down
8 changes: 7 additions & 1 deletion src/components/organization/OrganizationDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import React, { useEffect, useState } from 'react';
import type { AxiosResponse } from 'axios';
import CustomQRCode from '../../commonComponents/QRcode';
import CustomSpinner from '../CustomSpinner';
import { apiStatusCodes } from '../../config/CommonConstant';
import { apiStatusCodes, storageKeys } from '../../config/CommonConstant';
import { createConnection } from '../../api/organization';
import { dateConversion } from '../../utils/DateConversion';
import DateTooltip from '../Tooltip';
import CopyDid from '../../commonComponents/CopyDid'
import { setToLocalStorage } from '../../api/Auth';

const OrganizationDetails = ({ orgData }: { orgData: Organisation | null }) => {

Expand All @@ -32,8 +33,13 @@ const OrganizationDetails = ({ orgData }: { orgData: Organisation | null }) => {
setLoading(false)
}

const storeLedgerDetails = async () => {
await setToLocalStorage(storageKeys.LEDGER_ID, agentData?.ledgers.id);
}

useEffect(() => {
createQrConnection()
storeLedgerDetails()
}, [])

return (
Expand Down
3 changes: 2 additions & 1 deletion src/config/CommonConstant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ export const storageKeys = {
ECOSYSTEM_ID: "ecosystem_id",
ORG_DETAILS: "org_details",
ECOSYSTEM_ROLE: "ecosystem_role",
SOCKET_ID: "socket_id"
SOCKET_ID: "socket_id",
LEDGER_ID: "ledger_id"
}
0