aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2017-12-24 22:09:14 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2017-12-24 22:09:14 +0100
commiteb1d3c81f1a3c4ec33b5b630cf1e168ab946dc75 (patch)
tree46923762de3301a00e6de547a1d1d5ce3e1bb7d6 /src/containers
parentMerge pull request #494 from heavypackets/websecurity-enable-patch (diff)
downloadferdium-app-eb1d3c81f1a3c4ec33b5b630cf1e168ab946dc75.tar.gz
ferdium-app-eb1d3c81f1a3c4ec33b5b630cf1e168ab946dc75.tar.zst
ferdium-app-eb1d3c81f1a3c4ec33b5b630cf1e168ab946dc75.zip
Completely remove miner
Diffstat (limited to 'src/containers')
-rw-r--r--src/containers/settings/AccountScreen.js10
-rw-r--r--src/containers/ui/SubscriptionFormScreen.js54
2 files changed, 22 insertions, 42 deletions
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 {
32 payment.plansRequest.reload(); 32 payment.plansRequest.reload();
33 } 33 }
34 34
35 stopMiner() {
36 const { update } = this.props.actions.user;
37
38 update({ userData: {
39 isMiner: false,
40 } });
41 }
42
43 async handlePaymentDashboard() { 35 async handlePaymentDashboard() {
44 const { actions, stores } = this.props; 36 const { actions, stores } = this.props;
45 37
@@ -79,7 +71,6 @@ export default class AccountScreen extends Component {
79 <AccountDashboard 71 <AccountDashboard
80 user={user.data} 72 user={user.data}
81 orders={payment.orders} 73 orders={payment.orders}
82 hashrate={app.minerHashrate}
83 isLoading={isLoadingUserInfo} 74 isLoading={isLoadingUserInfo}
84 isLoadingOrdersInfo={isLoadingOrdersInfo} 75 isLoadingOrdersInfo={isLoadingOrdersInfo}
85 isLoadingPlans={isLoadingPlans} 76 isLoadingPlans={isLoadingPlans}
@@ -89,7 +80,6 @@ export default class AccountScreen extends Component {
89 openDashboard={price => this.handlePaymentDashboard(price)} 80 openDashboard={price => this.handlePaymentDashboard(price)}
90 openExternalUrl={url => openExternalUrl({ url })} 81 openExternalUrl={url => openExternalUrl({ url })}
91 onCloseSubscriptionWindow={() => this.onCloseWindow()} 82 onCloseSubscriptionWindow={() => this.onCloseWindow()}
92 stopMiner={() => this.stopMiner()}
93 deleteAccount={userActions.delete} 83 deleteAccount={userActions.delete}
94 isLoadingDeleteAccount={user.deleteAccountRequest.isExecuting} 84 isLoadingDeleteAccount={user.deleteAccountRequest.isExecuting}
95 isDeleteAccountSuccessful={user.deleteAccountRequest.wasExecuted && !user.deleteAccountRequest.isError} 85 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 {
37 skipAction, 37 skipAction,
38 } = this.props; 38 } = this.props;
39 39
40 if (plan !== 'mining') { 40 const interval = plan;
41 const interval = plan;
42 41
43 const { id } = stores.payment.plan[interval]; 42 const { id } = stores.payment.plan[interval];
44 actions.payment.createHostedPage({ 43 actions.payment.createHostedPage({
45 planId: id, 44 planId: id,
46 }); 45 });
47
48 const hostedPage = await stores.payment.createHostedPageRequest;
49 const url = `file://${__dirname}/../../index.html#/payment/${encodeURIComponent(hostedPage.url)}`;
50 46
51 if (hostedPage.url) { 47 const hostedPage = await stores.payment.createHostedPageRequest;
52 const paymentWindow = new BrowserWindow({ 48 const url = `file://${__dirname}/../../index.html#/payment/${encodeURIComponent(hostedPage.url)}`;
53 parent: remote.getCurrentWindow(),
54 modal: true,
55 title: '🔒 Franz Supporter License',
56 width: 600,
57 height: window.innerHeight - 100,
58 maxWidth: 600,
59 minWidth: 600,
60 webPreferences: {
61 nodeIntegration: true,
62 },
63 });
64 paymentWindow.loadURL(url);
65 49
66 paymentWindow.on('closed', () => { 50 if (hostedPage.url) {
67 onCloseWindow(); 51 const paymentWindow = new BrowserWindow({
68 }); 52 parent: remote.getCurrentWindow(),
69 } 53 modal: true,
70 } else { 54 title: '🔒 Franz Supporter License',
71 actions.user.update({ 55 width: 600,
72 userData: { 56 height: window.innerHeight - 100,
73 isMiner: true, 57 maxWidth: 600,
58 minWidth: 600,
59 webPreferences: {
60 nodeIntegration: true,
74 }, 61 },
75 }); 62 });
63 paymentWindow.loadURL(url);
76 64
77 skipAction(); 65 paymentWindow.on('closed', () => {
66 onCloseWindow();
67 });
78 } 68 }
79 } 69 }
80 70