From eb1d3c81f1a3c4ec33b5b630cf1e168ab946dc75 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Sun, 24 Dec 2017 22:09:14 +0100 Subject: Completely remove miner --- src/containers/settings/AccountScreen.js | 10 ------ src/containers/ui/SubscriptionFormScreen.js | 54 ++++++++++++----------------- 2 files changed, 22 insertions(+), 42 deletions(-) (limited to 'src/containers') diff --git a/src/containers/settings/AccountScreen.js b/src/containers/settings/AccountScreen.js index 008c495d4..21d0fe20a 100644 --- a/src/containers/settings/AccountScreen.js +++ b/src/containers/settings/AccountScreen.js @@ -32,14 +32,6 @@ export default class AccountScreen extends Component { payment.plansRequest.reload(); } - stopMiner() { - const { update } = this.props.actions.user; - - update({ userData: { - isMiner: false, - } }); - } - async handlePaymentDashboard() { const { actions, stores } = this.props; @@ -79,7 +71,6 @@ export default class AccountScreen extends Component { this.handlePaymentDashboard(price)} openExternalUrl={url => openExternalUrl({ url })} onCloseSubscriptionWindow={() => this.onCloseWindow()} - stopMiner={() => this.stopMiner()} deleteAccount={userActions.delete} isLoadingDeleteAccount={user.deleteAccountRequest.isExecuting} isDeleteAccountSuccessful={user.deleteAccountRequest.wasExecuted && !user.deleteAccountRequest.isError} diff --git a/src/containers/ui/SubscriptionFormScreen.js b/src/containers/ui/SubscriptionFormScreen.js index d08507809..3d9e413e1 100644 --- a/src/containers/ui/SubscriptionFormScreen.js +++ b/src/containers/ui/SubscriptionFormScreen.js @@ -37,44 +37,34 @@ export default class SubscriptionFormScreen extends Component { skipAction, } = this.props; - if (plan !== 'mining') { - const interval = plan; + const interval = plan; - const { id } = stores.payment.plan[interval]; - actions.payment.createHostedPage({ - planId: id, - }); - - const hostedPage = await stores.payment.createHostedPageRequest; - const url = `file://${__dirname}/../../index.html#/payment/${encodeURIComponent(hostedPage.url)}`; + const { id } = stores.payment.plan[interval]; + actions.payment.createHostedPage({ + planId: id, + }); - if (hostedPage.url) { - const paymentWindow = new BrowserWindow({ - parent: remote.getCurrentWindow(), - modal: true, - title: '🔒 Franz Supporter License', - width: 600, - height: window.innerHeight - 100, - maxWidth: 600, - minWidth: 600, - webPreferences: { - nodeIntegration: true, - }, - }); - paymentWindow.loadURL(url); + const hostedPage = await stores.payment.createHostedPageRequest; + const url = `file://${__dirname}/../../index.html#/payment/${encodeURIComponent(hostedPage.url)}`; - paymentWindow.on('closed', () => { - onCloseWindow(); - }); - } - } else { - actions.user.update({ - userData: { - isMiner: true, + if (hostedPage.url) { + const paymentWindow = new BrowserWindow({ + parent: remote.getCurrentWindow(), + modal: true, + title: '🔒 Franz Supporter License', + width: 600, + height: window.innerHeight - 100, + maxWidth: 600, + minWidth: 600, + webPreferences: { + nodeIntegration: true, }, }); + paymentWindow.loadURL(url); - skipAction(); + paymentWindow.on('closed', () => { + onCloseWindow(); + }); } } -- cgit v1.2.3-54-g00ecf