Skip to content

Commit 11e647b

Browse files
fix: Schemas not displayed when selecting "All Schemas" from dropdown (#1052)
* fix: issue regarding all schemas Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * fix: ellipsis comments Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> * fix: ellipsis comment Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com> --------- Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com>
1 parent f994e7f commit 11e647b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nextjs/src/features/schemas/components/SchemaList.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ const SchemaList = (props: {
8383
}): React.ReactElement => {
8484
const verificationFlag = props.verificationFlag ?? false
8585
const organizationId = useAppSelector((state) => state.organization.orgId)
86-
const ledgerId = useAppSelector((state) => state.organization.ledgerId)
8786
const token = useAppSelector((state) => state.auth.token)
8887

8988
const [schemaList, setSchemaList] = useState<ISchemaData[]>([])
9089

9190
const [, setSchemaListErr] = useState<string | null>('')
9291
const [loading, setLoading] = useState<boolean>(true)
9392
const [allSchemaFlag, setAllSchemaFlag] = useState<boolean>(false)
93+
const [ledger, setLedger] = useState<string>('')
9494
const [schemaType, setSchemaType] = useState('')
9595
const [, setWalletStatus] = useState(false)
9696
const [totalItem, setTotalItem] = useState(0)
@@ -165,7 +165,7 @@ const SchemaList = (props: {
165165
schemaResponse = await getAllSchemas(
166166
schemaListAPIParameter,
167167
schemaType,
168-
ledgerId,
168+
ledger,
169169
)
170170
} else {
171171
schemaResponse = await getAllSchemasByOrgId(
@@ -211,6 +211,8 @@ const SchemaList = (props: {
211211

212212
if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) {
213213
const did = data?.data?.org_agents?.[0]?.orgDid
214+
const ledgerId = data?.data?.org_agents?.[0]?.ledgers?.id ?? ''
215+
setLedger(ledgerId)
214216

215217
if (data?.data?.org_agents && data?.data?.org_agents.length > 0) {
216218
setWalletStatus(true)

0 commit comments

Comments
 (0)