Skip to content

Commit

Permalink
chore(suite): make stake in nutshell generic
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasklim committed Dec 28, 2024
1 parent f80ce45 commit 320ea32
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ const STAKING_DETAILS: StakingDetails[] = [
},
];

interface StakeEthInANutshellModalProps {
interface StakeInANutshellModalProps {
onCancel: () => void;
}

export const StakeEthInANutshellModal = ({ onCancel }: StakeEthInANutshellModalProps) => {
export const StakeInANutshellModal = ({ onCancel }: StakeInANutshellModalProps) => {
const account = useSelector(selectSelectedAccount);
const dispatch = useDispatch();
const { validatorWithdrawTime } = useSelector(state =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
AuthenticateDeviceModal,
AuthenticateDeviceFailModal,
DeviceAuthenticityOptOutModal,
StakeEthInANutshellModal,
StakeInANutshellModal,
StakeModal,
UnstakeModal,
ClaimModal,
Expand Down Expand Up @@ -185,8 +185,8 @@ export const UserContextModal = ({
return <AuthenticateDeviceModal />;
case 'authenticate-device-fail':
return <AuthenticateDeviceFailModal />;
case 'stake-eth-in-a-nutshell':
return <StakeEthInANutshellModal onCancel={onCancel} />;
case 'stake-in-a-nutshell':
return <StakeInANutshellModal onCancel={onCancel} />;
case 'stake':
return <StakeModal onCancel={onCancel} />;
case 'unstake':
Expand Down
2 changes: 1 addition & 1 deletion packages/suite/src/components/suite/modals/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export { UnecoCoinjoinModal } from './ReduxModal/UserContextModal/UnecoCoinjoinM
export { AuthenticateDeviceModal } from './ReduxModal/UserContextModal/AuthenticateDeviceModal';
export { AuthenticateDeviceFailModal } from './ReduxModal/UserContextModal/AuthenticateDeviceFailModal';
export { DeviceAuthenticityOptOutModal } from './ReduxModal/UserContextModal/DeviceAuthenticityOptOutModal';
export { StakeEthInANutshellModal } from './ReduxModal/UserContextModal/StakeEthInANutshellModal/StakeEthInANutshellModal';
export { StakeInANutshellModal } from './ReduxModal/UserContextModal/StakeInANutshellModal/StakeInANutshellModal';
export { StakeModal } from './ReduxModal/UserContextModal/StakeModal/StakeModal';
export { UnstakeModal } from './ReduxModal/UserContextModal/UnstakeModal/UnstakeModal';
export { ClaimModal } from './ReduxModal/UserContextModal/ClaimModal/ClaimModal';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export const EmptyStakingCard = () => {
const apy = useSelector(state => selectPoolStatsApyData(state, account?.symbol));

const dispatch = useDispatch();
const openStakingEthInANutshellModal = () => {
const openStakeInANutshellModal = () => {
if (!isStakingDisabled) {
dispatch(openModal({ type: 'stake-eth-in-a-nutshell' }));
dispatch(openModal({ type: 'stake-in-a-nutshell' }));
}
};

Expand Down Expand Up @@ -119,7 +119,7 @@ export const EmptyStakingCard = () => {
</Grid>
<Tooltip content={stakingMessageContent}>
<Button
onClick={openStakingEthInANutshellModal}
onClick={openStakeInANutshellModal}
isDisabled={isStakingDisabled}
icon={isStakingDisabled ? 'info' : undefined}
>
Expand Down
2 changes: 1 addition & 1 deletion suite-common/suite-types/src/modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export type UserContextPayload =
type: 'authenticate-device-fail';
}
| {
type: 'stake-eth-in-a-nutshell';
type: 'stake-in-a-nutshell';
}
| {
type: 'stake';
Expand Down

0 comments on commit 320ea32

Please sign in to comment.