Skip to content
Permalink
Browse files

feat(ui): make wallet connection indicator more informative

  • Loading branch information...
korhaliv committed Jun 10, 2019
1 parent 630807b commit c7b10c8817e396dd8512437fcf2e148f9ee530bf
@@ -55,6 +55,7 @@ const SettingsMenu = ({
fiatProps,
activeWalletSettings,
openModal,
isWalletReady,
history,
...rest
}) => {
@@ -99,7 +100,7 @@ const SettingsMenu = ({
return (
<Dropmenu items={items} justify="right" {...rest}>
<Flex alignItems="center">
<StatusIndicator mr={2} variant="online" />
<StatusIndicator mr={2} variant={isWalletReady ? 'online' : 'loading'} />
<WalletName wallet={activeWalletSettings} />
</Flex>
</Dropmenu>
@@ -117,6 +118,7 @@ SettingsMenu.propTypes = {
push: PropTypes.func.isRequired,
}),
isSettingsMenuOpen: PropTypes.bool,
isWalletReady: PropTypes.bool.isRequired,
localeProps: PropTypes.object.isRequired,
openModal: PropTypes.func.isRequired,
openSettingsMenu: PropTypes.func.isRequired,
@@ -1,6 +1,7 @@
import { connect } from 'react-redux'
import { setLocale } from 'reducers/locale'
import { setFiatTicker, tickerSelectors } from 'reducers/ticker'
import { infoSelectors } from 'reducers/info'
import {
openSettingsMenu,
closeSettingsMenu,
@@ -22,6 +23,7 @@ const mapStateToProps = state => ({
themes: state.theme.themes,
currentTheme: themeSelectors.currentTheme(state),
isSettingsMenuOpen: state.settingsmenu.isSettingsMenuOpen,
isWalletReady: infoSelectors.isSyncedToChain(state),
})

const mapDispatchToProps = {
@@ -37,6 +39,7 @@ const mapDispatchToProps = {

const mergeProps = (stateProps, dispatchProps, ownProps) => ({
activeWalletSettings: stateProps.activeWalletSettings,
isWalletReady: stateProps.isWalletReady,
activeSubMenu: stateProps.activeSubMenu,
isSettingsMenuOpen: stateProps.isSettingsMenuOpen,
openModal: dispatchProps.openModal,
@@ -180,6 +180,7 @@ infoSelectors.networksSelector = state => state.info.networks
infoSelectors.infoLoading = state => state.info.infoLoading
infoSelectors.infoLoaded = state => state.info.infoLoaded
infoSelectors.hasSynced = state => state.info.hasSynced
infoSelectors.isSyncedToChain = state => get(state.info, 'data.synced_to_chain', false)

infoSelectors.nodePub = state => {
const parseFromDataUri = () => {

0 comments on commit c7b10c8

Please sign in to comment.
You can’t perform that action at this time.