Skip to content

Commit

Permalink
common folder diff
Browse files Browse the repository at this point in the history
  • Loading branch information
Jsyro committed Oct 24, 2023
1 parent f016c52 commit 65ef592
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,28 @@ export const createVCWalletInvitation = (
throw new Error(err);
});
};

export const fetchVCWalletInvitations = (
partyGuid: string
): AppThunk<Promise<AxiosResponse<IVCInvitation>>> => (
dispatch
): Promise<AxiosResponse<IVCInvitation>> => {
dispatch(showLoading("modal"));
dispatch(request(reducerTypes.FETCH_VC_WALLET_CONNECTION_INVITATIONS));
return CustomAxios()
.get(
`${ENVIRONMENT.apiUrl}/verifiable-credentials/oob-invitation/${partyGuid}`,
createRequestHeader()
)
.then((response) => {
dispatch(success(reducerTypes.FETCH_VC_WALLET_CONNECTION_INVITATIONS));
dispatch(verfiableCredentialActions.storeVCConnectionInvitation(response.data));
dispatch(hideLoading("modal"));
return response;
})
.catch((err) => {
dispatch(error(reducerTypes.FETCH_VC_WALLET_CONNECTION_INVITATIONS));
dispatch(hideLoading("modal"));
throw new Error(err);
});
};
1 change: 1 addition & 0 deletions services/core-web/common/constants/reducerTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,4 @@ export const GET_GLOBAL_ALERTS = "GET_GLOBAL_ALERTS";
//Verficable Credentials
export const VERIFIABLE_CREDENTIALS = "VERIFIABLE_CREDENTIALS";
export const CREATE_VC_WALLET_CONNECTION_INVITATION = "CREATE_VC_WALLET_CONNECTION_INVITATION";
export const FETCH_VC_WALLET_CONNECTION_INVITATIONS = "FETCH_VC_WALLET_CONNECTION_INVITATIONS";

0 comments on commit 65ef592

Please sign in to comment.