Files
inji-wallet/machines/Issuers/IssuersSelectors.ts
balachandarg-tw 4633533eb2 [INJIMOB-2670]: Auto Activation Commits (#1810)
* [INJIMOB-2670]: Enable Auto Vc Activation (#1)

* [INJIMOB-2670]: Enable Auto Vc Activation (#1759)

* [INJIMOB-2670]: Hide Success Banner during Auto Activation.

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-2670]: Locales for Auto Activation Error message

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-2670]: Enable Auto Vc Activation and handle error scenarios

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-2670]: Remove activation sections from Help content

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-2670]: Update Event name to be generic

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-2670]: Remove communication details and add default OTP into constants

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

---------

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-2670]: Removing Mosip specific condition for mosipInidividualId

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

---------

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* add spanish language (#2)

Signed-off-by: Sk Mijan Hossain <skmijanhossain@gmail.com>
Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-2670]: Individual Id fix and add prefix to face image (#4)

* [INJIMOB-2670]: Individual Id fix and appending image format for face image.

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-2670]: Add Utils to append Png Base64 Prefix to faceImage.

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

---------

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-2670]: Update artifact Id and App name in fastlane scripts and build.gradle. (#3)

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-2670]: Add enable_auth and remove lilveness_detection in internal-build yml (#5)

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-2670]: Spanish locale updates. (#6)

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

* [INJIMOB-2670]: Liveness detection flag type changed to string

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>

---------

Signed-off-by: BalachandarG <balachandar.g@thoughtworks.com>
Signed-off-by: Sk Mijan Hossain <skmijanhossain@gmail.com>
Co-authored-by: mijan32 <74153970+mijan32@users.noreply.github.com>
2025-02-20 17:15:18 +05:30

72 lines
1.8 KiB
TypeScript

import {ErrorMessage} from '../../shared/openId4VCI/Utils';
import {StateFrom} from 'xstate';
import {IssuersMachine} from './IssuersMachine';
type State = StateFrom<typeof IssuersMachine>;
export function selectIssuers(state: State) {
return state.context.issuers;
}
export function selectSelectedIssuer(state: State) {
return state.context.selectedIssuer;
}
export function selectErrorMessageType(state: State) {
return state.context.errorMessage;
}
export function selectLoadingReason(state: State) {
return state.context.loadingReason;
}
export function selectIsDownloadCredentials(state: State) {
return state.matches('downloadCredentials');
}
export function selectIsBiometricCancelled(state: State) {
return (
state.matches('downloadCredentials.userCancelledBiometric') ||
state.matches('performAuthorization.userCancelledBiometric')
);
}
export function selectIsNonGenericError(state: State) {
return (
state.context.errorMessage !== ErrorMessage.GENERIC &&
state.context.errorMessage !== ''
);
}
export function selectIsDone(state: State) {
return state.matches('done');
}
export function selectIsIdle(state: State) {
return state.matches('idle');
}
export function selectStoring(state: State) {
return state.matches('storing');
}
export function selectIsError(state: State) {
return state.matches('error');
}
export function selectVerificationErrorMessage(state: State) {
return state.context.verificationErrorMessage;
}
export function selectAutoWalletBindingFailure(state: State) {
return state.context.isAutoWalletBindingFailed;
}
export function selectSelectingCredentialType(state: State) {
return state.matches('selectingCredentialType');
}
export function selectSupportedCredentialTypes(state: State) {
return state.context.supportedCredentialTypes;
}