diff --git a/.changeset/calm-planes-train.md b/.changeset/calm-planes-train.md new file mode 100644 index 000000000000..fbcd6c0bcba4 --- /dev/null +++ b/.changeset/calm-planes-train.md @@ -0,0 +1,6 @@ +--- +"ledger-live-desktop": minor +"live-mobile": minor +--- + +DOT stake earn more reward button redirecting to stakekit diff --git a/apps/ledger-live-desktop/src/renderer/families/polkadot/Nomination/index.tsx b/apps/ledger-live-desktop/src/renderer/families/polkadot/Nomination/index.tsx index 3512ff566e3c..4fc4e9eda3e0 100644 --- a/apps/ledger-live-desktop/src/renderer/families/polkadot/Nomination/index.tsx +++ b/apps/ledger-live-desktop/src/renderer/families/polkadot/Nomination/index.tsx @@ -44,6 +44,7 @@ import { } from "@ledgerhq/live-common/families/polkadot/types"; import { SubAccount } from "@ledgerhq/types-live"; import { useAccountUnit } from "~/renderer/hooks/useAccountUnit"; +import { useHistory } from "react-router"; type Props = { account: PolkadotAccount | SubAccount; @@ -64,6 +65,8 @@ export type NominationValidator = | PolkadotUnlocking; const Nomination = ({ account }: { account: PolkadotAccount }) => { + const history = useHistory(); + const discreet = useDiscreetMode(); const locale = useSelector(localeSelector); const unit = useAccountUnit(account); @@ -115,12 +118,15 @@ const Nomination = ({ account }: { account: PolkadotAccount }) => { }; }, [unlockings, unlockedBalance]); const onEarnRewards = useCallback(() => { - dispatch( - openModal("MODAL_POLKADOT_REWARDS_INFO", { - account, - }), - ); - }, [account, dispatch]); + history.push({ + pathname: "/platform/stakekit", + state: { + yieldId: "polkadot-dot-validator-staking", + accountId: account.id, + returnTo: `/account/${account.id}`, + }, + }); + }, [account, history]); const onNominate = useCallback(() => { dispatch( openModal("MODAL_POLKADOT_NOMINATE", { diff --git a/apps/ledger-live-mobile/src/families/polkadot/Nominations/index.tsx b/apps/ledger-live-mobile/src/families/polkadot/Nominations/index.tsx index 6643927ac72d..b3e793131e84 100644 --- a/apps/ledger-live-mobile/src/families/polkadot/Nominations/index.tsx +++ b/apps/ledger-live-mobile/src/families/polkadot/Nominations/index.tsx @@ -9,7 +9,6 @@ import { getMainAccount } from "@ledgerhq/live-common/account/index"; import { getDefaultExplorerView, getAddressExplorer } from "@ledgerhq/live-common/explorers"; import { canNominate, - isStash, hasExternalController, hasExternalStash, hasPendingOperationType, @@ -144,15 +143,16 @@ export default function Nominations(props: Props) { ); const onEarnRewards = useCallback(() => { - isStash(account) - ? onNavigate({ - route: NavigatorName.PolkadotNominateFlow, - screen: ScreenName.PolkadotNominateSelectValidators, - }) - : onNavigate({ - route: NavigatorName.PolkadotBondFlow, - screen: ScreenName.PolkadotBondStarted, - }); + onNavigate({ + route: NavigatorName.Base, + screen: ScreenName.PlatformApp, + params: { + platform: "stakekit", + name: "StakeKit", + accountId: account.id, + yieldId: "polkadot-dot-validator-staking", + }, + }); }, [account, onNavigate]); const onNominate = useCallback(() => {