Skip to content

Commit

Permalink
Merge pull request #8921 from LedgerHQ/fix/LIVE-15786-pass-missing-wa…
Browse files Browse the repository at this point in the history
…llet-state-to-accountActions

FIX: LIVE-15628 Fix app crashing when selecting EVM accounts
  • Loading branch information
adammino-ledger authored Jan 16, 2025
2 parents 79489d7 + 86e2d68 commit 7802de4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/pretty-boats-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": minor
---

Fix crash happening when selecting EVM account from account screen, missing walletState passed to decorator
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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");

Expand Down Expand Up @@ -191,6 +193,7 @@ export default function useAccountActions({ account, parentAccount, colors }: Pr
(decorators &&
decorators.getMainActions &&
decorators.getMainActions({
walletState,
account,
parentAccount,
colors,
Expand Down

0 comments on commit 7802de4

Please sign in to comment.