Skip to content

Commit

Permalink
fixup! feat(eth-staking): update account staked balance ui
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasklim committed Feb 28, 2024
1 parent f6685e4 commit 55eb99e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { useLocation } from 'react-router-dom';
import styled, { useTheme } from 'styled-components';
import { Button, Card, Icon, Paragraph, variables, IconButton } from '@trezor/components';
import { spacingsPx } from '@trezor/theme';
Expand Down Expand Up @@ -53,7 +52,7 @@ export const StakeEthBanner = () => {
const isDebug = useSelector(selectIsDebugModeActive);
const { stakeEthBannerClosed } = useSelector(state => state.suite.flags);
const hasSufficientEthForStaking = useSelector(selectSelectedAccountHasSufficientEthForStaking);
const { pathname } = useLocation();
const { pathname } = useSelector(state => state.router);
const isShown = !stakeEthBannerClosed && pathname === '/accounts' && hasSufficientEthForStaking;
const { ethApy } = useEverstakePoolStats();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export const getRootReducer = (selectedAccount = BTC_ACCOUNT, fees = DEFAULT_FEE
online: true,
settings: { debug: {}, theme: { variant: 'light' } },
evmSettings: { confirmExplanationModalClosed: {} },
flags: { stakeEthBannerClosed: false },
},
() => ({}),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ describe('account utils', () => {
'sign-verify',
'tokens',
'token-definitions',
'staking',
]);
expect(getNetworkFeatures(coinjoinAcc)).toEqual(['rbf', 'amount-unit']);
});
Expand Down

0 comments on commit 55eb99e

Please sign in to comment.