File tree Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 77 flex : 1 ;
88 flex-direction : column ;
99 justify-content : center ;
10- margin-bottom : -40px ;
11- padding : 20px ;
1210 text-align : center ;
1311
1412 h1 {
Original file line number Diff line number Diff line change @@ -217,6 +217,7 @@ function VotingPowerDelegation({
217217 placeholder = { intl . formatMessage ( messages . selectWalletPlaceholder ) }
218218 value = { state . selectedWallet ?. id || null }
219219 getStakePoolById = { getStakePoolById }
220+ disableSyncingWallets
220221 />
221222
222223 { state . selectedWallet && (
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ type Props = {
2727 value ?: string ;
2828 errorPosition ?: string ;
2929 disabled ?: boolean ;
30+ disableSyncingWallets ?: boolean ;
3031 wallets ?: Array < Partial < Wallet > > ;
3132} ;
3233export const onSearchWalletsDropdown = (
@@ -46,6 +47,7 @@ function WalletsDropdown({
4647 numberOfStakePools,
4748 onSearch = onSearchWalletsDropdown ,
4849 wallets = [ ] ,
50+ disableSyncingWallets,
4951 ...props
5052} : Props ) {
5153 const discreetModeFeature = useDiscreetModeFeature ( ) ;
@@ -81,6 +83,7 @@ function WalletsDropdown({
8183 walletName : wallet . name ,
8284 isSyncing,
8385 syncingProgress,
86+ isDisabled : disableSyncingWallets ? isSyncing : false ,
8487 } ;
8588 } ) ;
8689 return (
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import type { InjectedProps } from '../../types/injectedPropsType';
44import VotingPowerDelegation from '../../components/voting/voting-governance/VotingPowerDelegation' ;
55import VotingPowerDelegationConfirmationDialog from '../../components/voting/voting-governance/VotingPowerDelegationConfirmationDialog' ;
66import { ROUTES } from '../../routes-config' ;
7+ import VotingUnavailable from '../../components/voting/VotingUnavailable' ;
78
89type Props = InjectedProps ;
910
@@ -22,8 +23,21 @@ class VotingGovernancePage extends Component<Props> {
2223 app,
2324 voting,
2425 hardwareWallets,
26+ networkStatus,
2527 } = this . props . stores ;
2628 const { openExternalLink } = app ;
29+ const { isSynced, syncPercentage } = networkStatus ;
30+
31+ if ( ! isSynced ) {
32+ return (
33+ < VotingUnavailable
34+ syncPercentage = { syncPercentage }
35+ // @ts -ignore ts-migrate(2322) FIXME: Type '{ syncPercentage: any; onExternalLinkClick: ... Remove this comment to see the full error message
36+ onExternalLinkClick = { openExternalLink }
37+ />
38+ ) ;
39+ }
40+
2741 return (
2842 < VotingPowerDelegation
2943 onExternalLinkClick = { openExternalLink }
You can’t perform that action at this time.
0 commit comments