mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 05:27:57 -05:00
[INJIMOB-2633]: Remove base64 prefix and update individualId for sendAuthenticate (#1843)
Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>
This commit is contained in:
@@ -18,7 +18,6 @@ import {RemoveVcWarningOverlay} from '../../../screens/Home/MyVcs/RemoveVcWarnin
|
||||
import {HistoryTab} from '../../../screens/Home/MyVcs/HistoryTab';
|
||||
import {useCopilot} from 'react-native-copilot';
|
||||
import {useTranslation} from 'react-i18next';
|
||||
import {addPngBase64Prefix} from '../../../shared/commonUtil';
|
||||
|
||||
export const VCCardViewContent: React.FC<VCItemContentProps> = props => {
|
||||
const wellknownDisplayProperty = new Display(props.wellknown);
|
||||
@@ -54,7 +53,7 @@ export const VCCardViewContent: React.FC<VCItemContentProps> = props => {
|
||||
/>
|
||||
));
|
||||
const issuerLogo = props.verifiableCredentialData.issuerLogo;
|
||||
const faceImage = addPngBase64Prefix(props.verifiableCredentialData.face);
|
||||
const faceImage = props.verifiableCredentialData.face;
|
||||
const {start} = useCopilot();
|
||||
const {t} = useTranslation();
|
||||
|
||||
|
||||
@@ -22,11 +22,9 @@ import {
|
||||
import {ProfileIcon} from '../../ProfileIcon';
|
||||
import {VCFormat} from '../../../shared/VCFormat';
|
||||
import {VCItemField} from '../common/VCItemField';
|
||||
import {addPngBase64Prefix} from '../../../shared/commonUtil';
|
||||
|
||||
const getProfileImage = (face: any) => {
|
||||
if (face) {
|
||||
face = addPngBase64Prefix(face);
|
||||
return (
|
||||
<Image source={{uri: face}} style={Theme.Styles.detailedViewImage} />
|
||||
);
|
||||
|
||||
@@ -4,10 +4,9 @@ import {Theme} from './ui/styleUtils';
|
||||
import React from 'react';
|
||||
import {ProfileIcon} from './ProfileIcon';
|
||||
import {SvgImage} from './ui/svg';
|
||||
import {addPngBase64Prefix} from '../shared/commonUtil';
|
||||
|
||||
export const VcItemContainerProfileImage = (props: VCItemContentProps) => {
|
||||
const imageUri = addPngBase64Prefix(props.verifiableCredentialData.face);
|
||||
const imageUri = props.verifiableCredentialData.face;
|
||||
|
||||
return imageUri ? (
|
||||
<ImageBackground
|
||||
|
||||
@@ -26,7 +26,8 @@ export const QrLoginServices = {
|
||||
|
||||
sendAuthenticate: async context => {
|
||||
let privateKey;
|
||||
const individualId = context.selectedVc.vcMetadata.mosipIndividualId;
|
||||
const individualId =
|
||||
context.selectedVc.verifiableCredential.credential.credentialSubject.dni;
|
||||
const keyType = context.selectedVc.vcMetadata.downloadKeyType;
|
||||
if (!isHardwareKeystoreExists) {
|
||||
privateKey = await getPrivateKey(
|
||||
|
||||
@@ -63,10 +63,6 @@ export const removeWhiteSpace = (str: string) => {
|
||||
return str ? str.replace(/\s/g, '') : str;
|
||||
};
|
||||
|
||||
export const addPngBase64Prefix = (faceImage: string) => {
|
||||
return faceImage ? 'data:image/png;base64,' + faceImage : faceImage;
|
||||
};
|
||||
|
||||
export function logState(state: AnyState) {
|
||||
if (__DEV__) {
|
||||
const data = JSON.stringify(
|
||||
|
||||
Reference in New Issue
Block a user