Skip to content

Commit

Permalink
ui: hide generatenewblocks if spv
Browse files Browse the repository at this point in the history
  • Loading branch information
rithvikvibhu committed Feb 11, 2022
1 parent 0080800 commit 850b6b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/components/Sidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const nodeClient = clientStub(() => require('electron').ipcRenderer);
chainHeight: state.node.chain.height,
tip: state.node.chain.tip,
newBlockStatus: state.node.newBlockStatus,
spv: state.node.spv,
walletId: state.wallet.wid,
walletWatchOnly: state.wallet.watchOnly,
walletSync: state.wallet.walletSync,
Expand All @@ -39,6 +40,7 @@ class Sidebar extends Component {
walletId: PropTypes.string.isRequired,
tip: PropTypes.string.isRequired,
newBlockStatus: PropTypes.string.isRequired,
spv: PropTypes.bool.isRequired,
walletWatchOnly: PropTypes.bool.isRequired,
walletSync: PropTypes.bool.isRequired,
walletHeight: PropTypes.number.isRequired,
Expand Down Expand Up @@ -177,7 +179,11 @@ class Sidebar extends Component {
}

renderGenerateBlockButton(numblocks) {
const { network, address } = this.props;
const { network, address, spv } = this.props;
if (spv) {
return;
}

if ([NETWORKS.SIMNET, NETWORKS.REGTEST].includes(network)) {
return (
<button
Expand Down

0 comments on commit 850b6b4

Please sign in to comment.