Skip to content

Commit

Permalink
Merge pull request #8123 from LedgerHQ/LIVE-12404-llm-no-error-if-use…
Browse files Browse the repository at this point in the history
…r-tries-to-uninstall-all-with-stax-lnx-pin-locked

fix(llm): Close device card apps modal upon errors
  • Loading branch information
fAnselmi-Ledger authored Oct 23, 2024
2 parents 4942541 + 7909d23 commit 3fc1a12
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/small-experts-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

Close apps modal upon errors
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ const DeviceCard = ({
setAppsModalOpen(false);
}, [setAppsModalOpen]);

useEffect(() => {
if (state?.currentError?.error) {
closeAppsModal();
}
}, [state.currentError, closeAppsModal]);

const isLocalizationSupported = useMemo<boolean>(
() =>
deviceInfo.seVersion
Expand Down Expand Up @@ -194,15 +200,13 @@ const DeviceCard = ({
uninstallQueue={state.uninstallQueue}
deviceInfo={deviceInfo}
/>

{appList.length > 0 && (
<Flex mx={6} mb={6}>
<Button size="small" type="color" onPress={openAppsModal}>
<Trans i18nKey="manager.myApps" />
</Button>
</Flex>
)}

<InstalledAppsModal
isOpen={appsModalOpen}
onClose={closeAppsModal}
Expand Down

0 comments on commit 3fc1a12

Please sign in to comment.