Skip to content

Commit f531077

Browse files
authored
[LIVE-3619][LIVE-3599] Bugfix: Remove usage of account for mainAccount to prevent crash (#1194)
* Remove usage of 'account' for mainAccount since account can be a tokenAccount without currency * changeset
1 parent a6d70fd commit f531077

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.changeset/gold-coats-fix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"ledger-live-desktop": patch
3+
---
4+
5+
Fixing the usage of account to get a currency as some account types don't have one

apps/ledger-live-desktop/src/renderer/screens/account/index.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ const AccountPage = ({
9898
const dispatch = useDispatch();
9999

100100
useEffect(() => {
101-
if (account) {
102-
const bannerProps = getBannerProps(account, { t, dispatch });
101+
if (mainAccount) {
102+
const bannerProps = getBannerProps(mainAccount, { t, dispatch });
103103
setBanner(bannerProps);
104104
}
105-
}, [account, t, dispatch]);
105+
}, [mainAccount, t, dispatch]);
106106

107107
const hiddenNftCollections = useSelector(hiddenNftCollectionsSelector);
108108
const filterOperations = useCallback(

0 commit comments

Comments
 (0)