Skip to content

Commit

Permalink
fix(IT Wallet): [SIW-741] PID detail screen error after app restart (#…
Browse files Browse the repository at this point in the history
…5311)

## Short description
This PR fixes an issue which causes an error screen in the PID detail
screen after an app restart.
The issue is caused by a wrong selector which should provide the encoded
PID value but instead of selecting it from the persisted state it's
being selected from the issuing flow state.

## List of changes proposed in this pull request
- Replaces the wrong selector with the correct one which gets the
encoded PID value from the persisted state.

## How to test
Obtain a PID and then try to open the PID detail from the wallet home
screen. Then restart the app and open the PID detail again. It should
not show an error screen in both cases.
  • Loading branch information
LazyAfternoons authored Dec 6, 2023
1 parent 15b6a49 commit 9d99a97
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import { CredentialType, getPidDisplayData } from "../../utils/mocks";
import ItwClaimsWrapper from "../../components/ItwClaimsWrapper";
import { ITW_ROUTES } from "../../navigation/ItwRoutes";
import ItwKoView from "../../components/ItwKoView";
import { itwPidValueSelector } from "../../store/reducers/itwPidReducer";
import { PidResponse } from "../../utils/types";
import { getItwGenericMappedError } from "../../utils/itwErrorsUtils";
import { ItwCredentialsPidSelector } from "../../store/reducers/itwCredentialsReducer";

export type ContentViewParams = {
decodedPid: PidWithToken;
Expand All @@ -39,7 +39,7 @@ export type ContentViewParams = {
const ItwPrPidDetails = () => {
const navigation = useNavigation<IOStackNavigationProp<ItwParamsList>>();
const decodedPid = useIOSelector(itwDecodedPidValueSelector);
const pid = useIOSelector(itwPidValueSelector);
const pid = useIOSelector(ItwCredentialsPidSelector);
const pidDisplayData = getPidDisplayData();
const bannerViewRef = React.createRef<View>();
const spacerSize = 32;
Expand Down

0 comments on commit 9d99a97

Please sign in to comment.