From 444d3939c983389ef9c65fc38405fcef58e3cff3 Mon Sep 17 00:00:00 2001 From: adammino-ledger Date: Thu, 16 Jan 2025 10:33:18 +0000 Subject: [PATCH 1/2] pass the walletState to the action on account decorator --- .../src/screens/Account/hooks/useAccountActions.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/ledger-live-mobile/src/screens/Account/hooks/useAccountActions.tsx b/apps/ledger-live-mobile/src/screens/Account/hooks/useAccountActions.tsx index 27ef6d50babb..84d70378c07a 100644 --- a/apps/ledger-live-mobile/src/screens/Account/hooks/useAccountActions.tsx +++ b/apps/ledger-live-mobile/src/screens/Account/hooks/useAccountActions.tsx @@ -21,6 +21,7 @@ import { ActionButtonEvent } from "~/components/FabActions"; import { useCanShowStake } from "./useCanShowStake"; import { PtxToast } from "~/components/Toast/PtxToast"; import { useFetchCurrencyAll } from "@ledgerhq/live-common/exchange/swap/hooks/index"; +import { walletSelector } from "~/reducers/wallet"; type Props = { account: AccountLike; @@ -39,6 +40,7 @@ export default function useAccountActions({ account, parentAccount, colors }: Pr const readOnlyModeEnabled = useSelector(readOnlyModeEnabledSelector); const route = useRoute(); const { t } = useTranslation(); + const walletState = useSelector(walletSelector); const ptxServiceCtaScreens = useFeature("ptxServiceCtaScreens"); @@ -191,6 +193,7 @@ export default function useAccountActions({ account, parentAccount, colors }: Pr (decorators && decorators.getMainActions && decorators.getMainActions({ + walletState, account, parentAccount, colors, From 86e2d683dfa622496d891668418534983febeefd Mon Sep 17 00:00:00 2001 From: adammino-ledger Date: Thu, 16 Jan 2025 10:41:08 +0000 Subject: [PATCH 2/2] changeset added --- .changeset/pretty-boats-cry.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/pretty-boats-cry.md diff --git a/.changeset/pretty-boats-cry.md b/.changeset/pretty-boats-cry.md new file mode 100644 index 000000000000..56e3f05141b4 --- /dev/null +++ b/.changeset/pretty-boats-cry.md @@ -0,0 +1,5 @@ +--- +"live-mobile": minor +--- + +Fix crash happening when selecting EVM account from account screen, missing walletState passed to decorator