Skip to content

Commit

Permalink
fix: connection issuance payload changes for w3c (#759)
Browse files Browse the repository at this point in the history
* fix: payload changes for connection issuance

Signed-off-by: pranalidhanavade <[email protected]>

* fix: refactored logic of API call for org and all schema flag

Signed-off-by: pranalidhanavade <[email protected]>

* fix: removed unused imports

Signed-off-by: pranalidhanavade <[email protected]>

* fix: changes in  imports

Signed-off-by: pranalidhanavade <[email protected]>

* fix: resolved comments on PR

Signed-off-by: pranalidhanavade <[email protected]>

* fix: added condition to hide credential definition on email and bulk issuance data for w3c

Signed-off-by: pranalidhanavade <[email protected]>

* fix: added some comments

Signed-off-by: pranalidhanavade <[email protected]>

---------

Signed-off-by: pranalidhanavade <[email protected]>
  • Loading branch information
pranalidhanavade authored Sep 3, 2024
1 parent 664e1fb commit 8c0f50f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/components/Issuance/BulkIssuance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -609,17 +609,21 @@ const BulkIssuance = () => {
{credentialSelected?.schemaName || ""}{' '}
<span>[{credentialSelected?.schemaVersion}]</span>
</p>
{
schemaType === SchemaTypes.schema_INDY &&
<p className="text-black dark:text-white pb-2">
{' '}
<span className="font-semibold">
Credential Definition:
</span>{' '}
{credentialSelected?.credentialDefinition}
</p>
}

<span className='text-black dark:text-white font-semibold'>Attributes:</span>
<div className="flex flex-wrap overflow-hidden">
{
isAllSchema ==='false' ? (
!isAllSchema ? (
credentialSelected?.schemaAttributes?.map(
(element: IAttributes) => (
<div key={element.attributeName}>
Expand Down
7 changes: 5 additions & 2 deletions src/components/Issuance/EmailIssuance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ const EmailIssuance = () => {
currentSchemaType = SchemaTypes.schema_INDY;
}
setSchemaType(currentSchemaType);

//FIXME: Logic of API call as per schema selection
if((currentSchemaType === SchemaTypes.schema_INDY && orgId && isAllSchemaFlagSelected ) || (currentSchemaType && !isAllSchemaFlagSelected)){

const response = await getSchemaCredDef(currentSchemaType);
Expand Down Expand Up @@ -131,7 +133,8 @@ const EmailIssuance = () => {
}
setLoading(false);
}

//FIXME: Logic of API call as per schema selection

else if (currentSchemaType === SchemaTypes.schema_W3C && orgId && allSchemaSelectedFlag) {
const response = await getAllSchemas(schemaListAPIParameter,currentSchemaType);
const { data } = response as AxiosResponse;
Expand Down Expand Up @@ -456,7 +459,7 @@ const EmailIssuance = () => {

<div className="flex flex-wrap overflow-hidden">
{
isAllSchemaFlagSelected ==='false' ? (
!isAllSchemaFlagSelected ? (
credentialSelected?.schemaAttributes?.map((element: IAttributes) => (
<div key={element.attributeName} className="truncate">
<span className="m-1 bg-blue-100 text-blue-800 text-sm font-medium mr-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300">
Expand Down

0 comments on commit 8c0f50f

Please sign in to comment.