From b03195c545b32b59be403c04440324361ba8ed49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Tue, 11 Sep 2018 13:04:43 +0200 Subject: [PATCH] Disable Ripple & ZenCash install (now XRP and Horizen) --- src/components/ManagerPage/AppsList.js | 5 ++++- src/components/ManagerPage/ManagerApp.js | 26 +++++++++++++----------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/components/ManagerPage/AppsList.js b/src/components/ManagerPage/AppsList.js index e2f8bf1c..f589ea7f 100644 --- a/src/components/ManagerPage/AppsList.js +++ b/src/components/ManagerPage/AppsList.js @@ -71,6 +71,9 @@ type State = { mode: Mode, } +const oldAppsInstallDisabled = ['ZenCash', 'Ripple'] +const canHandleInstall = c => !oldAppsInstallDisabled.includes(c.name) + const LoadingApp = () => ( @@ -285,7 +288,7 @@ class AppsList extends PureComponent { name={c.name} version={`Version ${c.version}`} icon={ICONS_FALLBACK[c.icon] || c.icon} - onInstall={this.handleInstallApp(c)} + onInstall={canHandleInstall(c) ? this.handleInstallApp(c) : null} onUninstall={this.handleUninstallApp(c)} /> ))} diff --git a/src/components/ManagerPage/ManagerApp.js b/src/components/ManagerPage/ManagerApp.js index 9f4b4494..eb50b073 100644 --- a/src/components/ManagerPage/ManagerApp.js +++ b/src/components/ManagerPage/ManagerApp.js @@ -49,7 +49,7 @@ type Props = { name: string, version: string, icon: string, - onInstall: Function, + onInstall?: Function, onUninstall: Function, } @@ -64,17 +64,19 @@ function ManagerApp({ name, version, icon, onInstall, onUninstall, t }: Props) { {version} - + {onInstall ? ( + + ) : null}