diff --git a/components/WalletHeader.tsx b/components/WalletHeader.tsx index 3bae70529..186413faf 100644 --- a/components/WalletHeader.tsx +++ b/components/WalletHeader.tsx @@ -27,6 +27,8 @@ import { Row } from '../components/layout/Row'; const Contact = require('../assets/images/Mascot.png'); +const TorIcon = require('../assets/images/tor.png'); + const protectedNavigation = async ( navigation: any, route: string, @@ -196,6 +198,7 @@ export default class WalletHeader extends React.Component< ); const displayName = selectedNode && selectedNode.nickname; + const nodeAddress = SettingsStore.host || SettingsStore.url; let infoValue: string; if (NodeInfoStore.nodeInfo.isTestNet) { @@ -219,6 +222,26 @@ export default class WalletHeader extends React.Component< ) : null; }; + const TorBadge = () => ( + <> + {nodeAddress && nodeAddress.includes('.onion') ? ( + navigation.navigate('NodeInfo')} + > + + + ) : null} + + ); + return (
} @@ -232,10 +255,14 @@ export default class WalletHeader extends React.Component< {displayName} + ) : ( - + + + + ) } rightComponent={ diff --git a/views/Wallet/BalancePane.tsx b/views/Wallet/BalancePane.tsx index 49bd49a6e..b77dd6fd2 100644 --- a/views/Wallet/BalancePane.tsx +++ b/views/Wallet/BalancePane.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Image, Text, View, StyleSheet, TouchableOpacity } from 'react-native'; +import { Text, View, StyleSheet } from 'react-native'; import { inject, observer } from 'mobx-react'; import Button from '../../components/Button'; import WalletHeader from '../../components/WalletHeader'; @@ -14,8 +14,6 @@ import SettingsStore from './../../stores/SettingsStore'; import { version, playStore } from './../../package.json'; -const TorIcon = require('./../../assets/images/tor.png'); - interface BalancePaneProps { navigation: any; BalanceStore: BalanceStore; @@ -39,7 +37,6 @@ export default class BalancePane extends React.PureComponent< pendingOpenBalance } = BalanceStore; const { implementation } = SettingsStore; - const nodeAddress = SettingsStore.host || SettingsStore.url; const pendingUnconfirmedBalance = Number(pendingOpenBalance) + Number(unconfirmedBlockchainBalance); @@ -113,21 +110,6 @@ export default class BalancePane extends React.PureComponent< ); - const NetworkBadge = () => ( - <> - {nodeAddress && nodeAddress.includes('.onion') ? ( - navigation.navigate('NodeInfo')} - > - - - ) : null} - - ); - let balancePane; const error = NodeInfoStore.error || SettingsStore.error; @@ -150,14 +132,6 @@ export default class BalancePane extends React.PureComponent< ) : ( )} - - - );