Skip to content

Commit

Permalink
Merge pull request #7101 from AfraHussaindeen/idvp-img-url-fix-revert
Browse files Browse the repository at this point in the history
Remove the idvp image URL from the API request body and update logos
  • Loading branch information
AfraHussaindeen authored Dec 5, 2024
2 parents 758c218 + a033918 commit bbf0cbc
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 15 deletions.
6 changes: 6 additions & 0 deletions .changeset/cyan-shirts-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@wso2is/admin.identity-verification-providers.v1": patch
"@wso2is/console": patch
---

Remove the idvp image URL from the API request body and onfido logo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ const IdVPCreationModal: FunctionComponent<IdVPCreationModalPropsInterface> = ({
claims: fetchedTemplateData.payload.claims,
configProperties: configPropertiesInitialValues,
description: fetchedTemplateData.payload.description,
image: fetchedTemplateData.payload.image,
isEnabled: true,
templateId: selectedTemplate?.id,
templateVersion: selectedTemplate?.version
Expand Down Expand Up @@ -132,7 +131,6 @@ const IdVPCreationModal: FunctionComponent<IdVPCreationModalPropsInterface> = ({
claims: values.claims as IdVPClaimsInterface[],
configProperties,
description: values.description as string,
image: values.image as string,
isEnabled: true,
name: values.name as string,
type: values.templateId as string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export const EditIdentityVerificationProvider: FunctionComponent<EditIdentityVer
return defaultValues;
}, {} as Record<string, unknown>);

delete identityVerificationProvider.image;

return {
...identityVerificationProvider,
configProperties: configPropertiesInitialValues
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
*/

import { useRequiredScopes } from "@wso2is/access-control";
import { ConnectionsManagementUtils } from "@wso2is/admin.connections.v1/utils/connection-utils";
import { AppConstants, AppState, FeatureConfigInterface, history } from "@wso2is/admin.core.v1";
import useUIConfig from "@wso2is/admin.core.v1/hooks/use-ui-configs";
import { IdentityAppsApiException } from "@wso2is/core/exceptions";
import { AlertLevels, IdentifiableComponentInterface } from "@wso2is/core/models";
import { addAlert } from "@wso2is/core/store";
Expand Down Expand Up @@ -103,6 +105,9 @@ const IdentityVerificationProviderEditPage: FunctionComponent<IDVPEditPagePropsI
const hasIdVPDeletePermissions: boolean = useRequiredScopes(
featureConfig?.identityVerificationProviders?.scopes?.delete);

const { UIConfig } = useUIConfig();
const connectionResourcesUrl: string = UIConfig?.connectionResourcesUrl;

/**
* Handles the IdVP fetch error.
*/
Expand Down Expand Up @@ -224,7 +229,7 @@ const IdentityVerificationProviderEditPage: FunctionComponent<IDVPEditPagePropsI
<AppAvatar
hoverable={ false }
name={ name }
image={ image }
image={ ConnectionsManagementUtils.resolveConnectionResourcePath(connectionResourcesUrl, image) }
size="tiny"
/>
);
Expand Down Expand Up @@ -314,7 +319,7 @@ const IdentityVerificationProviderEditPage: FunctionComponent<IDVPEditPagePropsI
>
{
<EditIdentityVerificationProvider
identityVerificationProvider={ fetchedIdVP }
identityVerificationProvider={ { ...fetchedIdVP } }
isLoading={
isIdVPFetchRequestLoading
|| isMetadataFetchRequestLoading
Expand Down

0 comments on commit bbf0cbc

Please sign in to comment.