From bb9ccb9e38990f9670de10df185d9641767d6e4b Mon Sep 17 00:00:00 2001 From: Rithvik Vibhu Date: Sun, 27 Mar 2022 00:03:47 +0530 Subject: [PATCH] exchange: disable in spv mode --- app/pages/Exchange/index.js | 6 ++++++ locales/en.json | 1 + 2 files changed, 7 insertions(+) diff --git a/app/pages/Exchange/index.js b/app/pages/Exchange/index.js index 4bf1ced49..aebc8a050 100644 --- a/app/pages/Exchange/index.js +++ b/app/pages/Exchange/index.js @@ -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, }; @@ -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'); } @@ -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)), diff --git a/locales/en.json b/locales/en.json index ea72eac08..51491a7e0 100644 --- a/locales/en.json +++ b/locales/en.json @@ -204,6 +204,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",