Skip to content

Commit

Permalink
refactor(INJI-435): remove duplicate assignments of selectors
Browse files Browse the repository at this point in the history
Signed-off-by: PuBHARGAVI <[email protected]>
  • Loading branch information
PuBHARGAVI committed Oct 25, 2023
1 parent 3c049bc commit 8b633ec
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions components/VC/MosipVCItem/VcItemController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,18 @@ export function useVcItemController(

const service = useInterpret(machine.current, {devTools: __DEV__});

let context = useSelector(service, selectContext);
let verifiableCredential = useSelector(service, selectVerifiableCredential);
let emptyWalletBindingId = useSelector(service, selectEmptyWalletBindingId);
let isKebabPopUp = useSelector(service, selectKebabPopUp);
const context = useSelector(service, selectContext);
const verifiableCredential = useSelector(service, selectVerifiableCredential);
const emptyWalletBindingId = useSelector(service, selectEmptyWalletBindingId);
const isKebabPopUp = useSelector(service, selectKebabPopUp);
let DISMISS = () => service.send(ExistingMosipVCItemEvents.DISMISS());
let KEBAB_POPUP = () => service.send(ExistingMosipVCItemEvents.KEBAB_POPUP());
const isSavingFailedInIdle = useSelector(service, selectIsSavingFailedInIdle);
const storeErrorTranslationPath = 'errors.savingFailed';
let generatedOn = useSelector(service, selectGeneratedOn);
const generatedOn = useSelector(service, selectGeneratedOn);
if (props.vcMetadata.isFromOpenId4VCI()) {
context = useSelector(service, selectContext);
isKebabPopUp = useSelector(service, selectKebabPopUp);
generatedOn = useSelector(service, selectGeneratedOn);
emptyWalletBindingId = useSelector(service, selectEmptyWalletBindingId);
DISMISS = () => service.send(EsignetMosipVCItemEvents.DISMISS());
KEBAB_POPUP = () => service.send(EsignetMosipVCItemEvents.KEBAB_POPUP());
verifiableCredential = useSelector(service, selectVerifiableCredential);
}
return {
service,
Expand Down

0 comments on commit 8b633ec

Please sign in to comment.