Skip to content

Commit

Permalink
Use network colors here
Browse files Browse the repository at this point in the history
  • Loading branch information
rickycodes committed Jun 12, 2020
1 parent aa2895d commit f8432f2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions app/components/UI/TransactionHeader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@ class TransactionHeader extends PureComponent {
/**
* String representing the selected network
*/
networkType: PropTypes.string,
/**
* Object representing the status of infura networks
*/
networkStatus: PropTypes.object
networkType: PropTypes.string
};

/**
Expand All @@ -83,8 +79,8 @@ class TransactionHeader extends PureComponent {
* @return {element} - JSX view element
*/
renderNetworkStatusIndicator = () => {
const { networkType, networkStatus } = this.props;
const networkStatusIndicatorColor = networkStatus[networkType] === 'ok' ? 'green' : 'red';
const { networkType } = this.props;
const networkStatusIndicatorColor = (networkList[networkType] && networkList[networkType].color) || null;
const networkStatusIndicator = (
<View style={[styles.networkStatusIndicator, { backgroundColor: networkStatusIndicatorColor }]} />
);
Expand Down

0 comments on commit f8432f2

Please sign in to comment.