mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 21:48:04 -05:00
* chore(INJI-195): upgrade react native version and dependencies * chore(INJI-195): upgrade expo version and dependencies * chore(INJI-195): modify associated files on version upgrade * chore(INJI-295): fixed react native flipper and patch packages * chore(INJI-195): fix for expo prebuild * chore(INJI-195): expo linked to android/ios projects * chore(INJI-195): update metro config * chore(INJI-195): fix ios build with mmkv storage patch * chore(INJI-195): gradle version modified * chore(INJI-195): fixed rn version 0.71.8 due to mmkv library issue * chore(INJI-195): removed files in android * chore(INJI-195): fix 0.71.8 for iOS project through pods with expo linking * chore(INJI-195): fix for custom fonts added through pods due to rn linkage * chore(INJI-195): fix for removing assets.car generated from pods * Modify Node version in pipeline (#806) * chore(INJI-195): fix for android splash screen not shown up * chore(INJI-195): upgraded to node 18 in pipeline * chore(INJI-195): add the pod install twice to remove duplicates via script workaround (#807) Signed-off-by: dhivya0413 <120356578+dhivya0413@users.noreply.github.com> * INJI-195 Set the signing team for iOS (#810) * chore(INJI-195): add the pod install twice to remove duplicates via script workaround * chore(INJI-195): set the signing team for ios build --------- Signed-off-by: dhivya0413 <120356578+dhivya0413@users.noreply.github.com> * Modify github runner to self hosted runner (#811) * chore(INJI-195): add the pod install twice to remove duplicates via script workaround * chore(INJI-195): set the signing team for ios build * chore(INJI-195): set the self hosted runner for ios build --------- Signed-off-by: dhivya0413 <120356578+dhivya0413@users.noreply.github.com> * Modify self hosted runner to github hosted runner (#813) * chore(INJI-195): add the pod install twice to remove duplicates via script workaround * chore(INJI-195): set the signing team for ios build * chore(INJI-195): set the self hosted runner for ios build * chore(INJI-195): modify the self hosted to github hosted runner --------- Signed-off-by: dhivya0413 <120356578+dhivya0413@users.noreply.github.com> * chore(INJI-195): modify the self hosted to github hosted runner * chore(INJI-195): set the code signing identity for ios build * chore(INJI-195): assigned app icon files to asset --------- Signed-off-by: dhivya0413 <120356578+dhivya0413@users.noreply.github.com> Signed-off-by: Swati Goel <meet2swati@gmail.com> Co-authored-by: Swati Goel <meet2swati@gmail.com>
107 lines
3.1 KiB
TypeScript
107 lines
3.1 KiB
TypeScript
import React from 'react';
|
|
import {Icon, ListItem} from 'react-native-elements';
|
|
import {Row, Text} from '../../../components/ui';
|
|
import {Theme} from '../../../components/ui/styleUtils';
|
|
import {useTranslation} from 'react-i18next';
|
|
import {BindingVcWarningOverlay} from './BindingVcWarningOverlay';
|
|
import {OtpVerificationModal} from './OtpVerificationModal';
|
|
import {MessageOverlay} from '../../../components/MessageOverlay';
|
|
import {useKebabPopUp} from '../../../components/KebabPopUpController';
|
|
import {Dimensions} from 'react-native';
|
|
import {ActorRefFrom} from 'xstate';
|
|
import {vcItemMachine} from '../../../machines/vcItem';
|
|
import testIDProps from '../../../shared/commonUtil';
|
|
|
|
export const WalletBinding: React.FC<WalletBindingProps> = props => {
|
|
const controller = useKebabPopUp(props);
|
|
|
|
const WalletVerified: React.FC = () => {
|
|
return (
|
|
<Icon
|
|
name="verified-user"
|
|
color={Theme.Colors.VerifiedIcon}
|
|
size={28}
|
|
containerStyle={{marginStart: 4, bottom: 1}}
|
|
/>
|
|
);
|
|
};
|
|
const {t} = useTranslation('WalletBinding');
|
|
|
|
return controller.emptyWalletBindingId ? (
|
|
<ListItem bottomDivider onPress={controller.ADD_WALLET_BINDING_ID}>
|
|
{props.Icon && (
|
|
<Icon
|
|
name={props.Icon}
|
|
type="font-awesome"
|
|
size={20}
|
|
style={Theme.Styles.profileIconBg}
|
|
color={Theme.Colors.Icon}
|
|
/>
|
|
)}
|
|
<ListItem.Content>
|
|
<ListItem.Title {...testIDProps('pendingActivationOrActivated')}>
|
|
<Text weight="bold" size="small">
|
|
{props.label}
|
|
</Text>
|
|
</ListItem.Title>
|
|
<Text
|
|
testID="content"
|
|
weight="semibold"
|
|
color={Theme.Colors.walletbindingContent}
|
|
size="smaller">
|
|
{props.content}
|
|
</Text>
|
|
</ListItem.Content>
|
|
|
|
<BindingVcWarningOverlay
|
|
isVisible={controller.isBindingWarning}
|
|
onConfirm={controller.CONFIRM}
|
|
onCancel={controller.CANCEL}
|
|
/>
|
|
|
|
<OtpVerificationModal
|
|
isVisible={controller.isAcceptingOtpInput}
|
|
onDismiss={controller.DISMISS}
|
|
onInputDone={controller.INPUT_OTP}
|
|
error={controller.otpError}
|
|
/>
|
|
<MessageOverlay
|
|
isVisible={controller.isWalletBindingError}
|
|
title={controller.walletBindingError}
|
|
onCancel={controller.CANCEL}
|
|
/>
|
|
<MessageOverlay
|
|
isVisible={controller.WalletBindingInProgress}
|
|
title={t('inProgress')}
|
|
progress
|
|
/>
|
|
</ListItem>
|
|
) : (
|
|
<ListItem bottomDivider>
|
|
<Row
|
|
testID="profileAuthenticated"
|
|
width={Dimensions.get('screen').width * 0.8}
|
|
align="space-between"
|
|
crossAlign="center">
|
|
<Row crossAlign="center" style={{flex: 1}}>
|
|
<WalletVerified />
|
|
<Text
|
|
color={Theme.Colors.Details}
|
|
weight="bold"
|
|
size="small"
|
|
margin="10 10 10 10"
|
|
children={t('profileAuthenticated')}></Text>
|
|
</Row>
|
|
</Row>
|
|
</ListItem>
|
|
);
|
|
};
|
|
|
|
interface WalletBindingProps {
|
|
testID?: string;
|
|
label: string;
|
|
content?: string;
|
|
Icon?: string;
|
|
service: ActorRefFrom<typeof vcItemMachine>;
|
|
}
|