diff --git a/src/renderer/families/solana/Delegation/index.js b/src/renderer/families/solana/Delegation/index.js index 7f59653a6d..a12a34b06c 100644 --- a/src/renderer/families/solana/Delegation/index.js +++ b/src/renderer/families/solana/Delegation/index.js @@ -43,7 +43,7 @@ const Delegation = ({ account }: Props) => { const onEarnRewards = useCallback(() => { dispatch( - openModal("MODAL_SOLANA_DELEGATE", { + openModal("MODAL_SOLANA_REWARDS_INFO", { account, }), ); @@ -90,69 +90,83 @@ const Delegation = ({ account }: Props) => { return ( <> - - }> - - - {hasStakes ? ( - <> -
- {stakesWithMeta.map(stakeWithMeta => ( - - ))} - - ) : ( - - - - - - - } - onClick={() => openURL(urls.solana.staking)} - /> - - - - - - - )} - + + + + +
+ {stakesWithMeta.map(stakeWithMeta => ( + + ))} + + ) : null} + + {!hasStakes && account.spendableBalance.gt(0) ? ( + + + + ) : null} ); }; +type EarnRewardsCTAProps = { + account: Account, + onEarnRewards: () => void, +}; + +function EarnRewardsCTA({ account, onEarnRewards }: EarnRewardsCTAProps) { + return ( + + + + + + + } + onClick={() => openURL(urls.solana.staking)} + /> + + + + + + + ); +} + const Delegations = ({ account }: Props) => { if (!account.solanaResources) return null; diff --git a/src/renderer/families/solana/DelegationActivateFlowModal/steps/StepValidator.js b/src/renderer/families/solana/DelegationActivateFlowModal/steps/StepValidator.js index f6f90f8bee..7efb5565be 100644 --- a/src/renderer/families/solana/DelegationActivateFlowModal/steps/StepValidator.js +++ b/src/renderer/families/solana/DelegationActivateFlowModal/steps/StepValidator.js @@ -79,7 +79,7 @@ export function StepValidatorFooter({ return ( <> - +