Skip to content

Commit

Permalink
exchange: disable in spv mode
Browse files Browse the repository at this point in the history
  • Loading branch information
rithvikvibhu committed Jul 5, 2022
1 parent f549aed commit 51a8e70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/pages/Exchange/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const shakedex = sClientStub(() => require('electron').ipcRenderer);

class Exchange extends Component {
static propTypes = {
spv: PropTypes.bool.isRequired,
deeplinkParams: PropTypes.object.isRequired,
clearDeeplinkParams: PropTypes.func.isRequired,
};
Expand Down Expand Up @@ -318,6 +319,10 @@ class Exchange extends Component {

render() {
const { t } = this.context;
if (this.props.spv) {
return t('notSupportInSPV');
}

if (this.props.walletWatchOnly) {
return t('notSupportWithLedger');
}
Expand Down Expand Up @@ -734,6 +739,7 @@ export default connect(
finalizingName: state.exchange.finalizingName,
deeplinkParams: state.app.deeplinkParams,
walletWatchOnly: state.wallet.watchOnly,
spv: state.node.spv,
}),
(dispatch) => ({
setAuctionPage: (page) => dispatch(setAuctionPage(page)),
Expand Down
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
"noFillsFound": "No fills found.",
"noListingFound": "No listings found.",
"noLockedHNS": "No locked HNS",
"notSupportInSPV": "Not currently supported in SPV mode.",
"notSupportWithLedger": "Not currently supported with Ledger wallet.",
"note": "Note",
"now": "Now",
Expand Down

0 comments on commit 51a8e70

Please sign in to comment.