From 482bedb560bb7eaf8708644234f7163d5fbcdd3d Mon Sep 17 00:00:00 2001 From: Philip Obosi Date: Tue, 8 Feb 2022 19:00:00 +0200 Subject: [PATCH] fix: remove unused vars --- .../recovery_setup/SetupRecoveryMethod.js | 73 ++++++++++--------- 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/packages/frontend/src/components/accounts/recovery_setup/SetupRecoveryMethod.js b/packages/frontend/src/components/accounts/recovery_setup/SetupRecoveryMethod.js index 90ebdff397..710d1d272c 100644 --- a/packages/frontend/src/components/accounts/recovery_setup/SetupRecoveryMethod.js +++ b/packages/frontend/src/components/accounts/recovery_setup/SetupRecoveryMethod.js @@ -38,6 +38,7 @@ const { setLinkdropAmount } = linkdropActions; const { fetchRecoveryMethods } = recoveryMethodsActions; + // FIXME: Use `debug` npm package so we can keep some debug logging around but not spam the console everywhere const ENABLE_DEBUG_LOGGING = false; const debugLog = (...args) => ENABLE_DEBUG_LOGGING && console.log('SetupRecoveryMethod:', ...args); @@ -192,9 +193,9 @@ class SetupRecoveryMethod extends Component { location, setLinkdropAmount, redirectTo, + checkIsNew, addLocalKeyAndFinishSetup, - createIdentityFundedAccount, - checkIsNew + createIdentityFundedAccount } = this.props; const fundingOptions = parseFundingOptions(location.search); @@ -556,38 +557,40 @@ class SetupRecoveryMethod extends Component { } } -const { - initializeRecoveryMethod, - setupRecoveryMessage, - redirectToApp, - redirectTo, - getAccessKeys, - getLedgerKey, - get2faMethod, - checkIsNew, - saveAccount, - fundCreateAccount, - validateSecurityCode -} = accountActions; - -const mapDispatchToProps = { - setupRecoveryMessage, - redirectToApp, - fetchRecoveryMethods, - initializeRecoveryMethod, - getAccessKeys, - getLedgerKey, - get2faMethod, - checkIsNew, - redirectTo, - showCustomAlert, - fundCreateAccount, - createNewAccount, - saveAccount, - validateSecurityCode, - setLinkdropAmount, - addLocalKeyAndFinishSetup, - createIdentityFundedAccount +const mapDispatchToProps =()=> { + const { + initializeRecoveryMethod, + setupRecoveryMessage, + redirectToApp, + redirectTo, + getAccessKeys, + getLedgerKey, + get2faMethod, + checkIsNew, + saveAccount, + fundCreateAccount, + validateSecurityCode + } = accountActions; + + return { + setupRecoveryMessage, + redirectToApp, + fetchRecoveryMethods, + initializeRecoveryMethod, + getAccessKeys, + getLedgerKey, + get2faMethod, + checkIsNew, + redirectTo, + showCustomAlert, + fundCreateAccount, + createNewAccount, + saveAccount, + validateSecurityCode, + setLinkdropAmount, + addLocalKeyAndFinishSetup, + createIdentityFundedAccount + }; }; const mapStateToProps = (state, { match }) => { @@ -607,4 +610,4 @@ const mapStateToProps = (state, { match }) => { }; }; -export const SetupRecoveryMethodWithRouter = connect(mapStateToProps, mapDispatchToProps)(withGoogleReCaptcha(SetupRecoveryMethod)); +export const SetupRecoveryMethodWithRouter = connect(mapStateToProps, mapDispatchToProps)(withGoogleReCaptcha(SetupRecoveryMethod)); \ No newline at end of file