From 4b1c51aec56c59518a0977661683d148e756dfce Mon Sep 17 00:00:00 2001 From: David Walsh Date: Mon, 8 Nov 2021 09:28:40 -0600 Subject: [PATCH] Rename the function of the Ledger preference renaming (#12459) --- ui/pages/settings/advanced-tab/advanced-tab.component.js | 6 +++--- .../settings/advanced-tab/advanced-tab.component.test.js | 4 ++-- ui/pages/settings/advanced-tab/advanced-tab.container.js | 6 +++--- ui/pages/settings/advanced-tab/advanced-tab.stories.js | 2 +- ui/store/actions.js | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ui/pages/settings/advanced-tab/advanced-tab.component.js b/ui/pages/settings/advanced-tab/advanced-tab.component.js index 001b51d8b..361c7d8c9 100644 --- a/ui/pages/settings/advanced-tab/advanced-tab.component.js +++ b/ui/pages/settings/advanced-tab/advanced-tab.component.js @@ -47,7 +47,7 @@ export default class AdvancedTab extends PureComponent { setIpfsGateway: PropTypes.func.isRequired, ipfsGateway: PropTypes.string.isRequired, ledgerTransportType: PropTypes.oneOf(Object.values(LEDGER_TRANSPORT_TYPES)), - setLedgerLivePreference: PropTypes.func.isRequired, + setLedgerTransportPreference: PropTypes.func.isRequired, setDismissSeedBackUpReminder: PropTypes.func.isRequired, dismissSeedBackUpReminder: PropTypes.bool.isRequired, userHasALedgerAccount: PropTypes.bool.isRequired, @@ -436,7 +436,7 @@ export default class AdvancedTab extends PureComponent { const { t } = this.context; const { ledgerTransportType, - setLedgerLivePreference, + setLedgerTransportPreference, userHasALedgerAccount, } = this.props; @@ -501,7 +501,7 @@ export default class AdvancedTab extends PureComponent { ) { this.setState({ showLedgerTransportWarning: true }); } - setLedgerLivePreference(transportType); + setLedgerTransportPreference(transportType); if ( transportType === LEDGER_TRANSPORT_TYPES.WEBHID && userHasALedgerAccount diff --git a/ui/pages/settings/advanced-tab/advanced-tab.component.test.js b/ui/pages/settings/advanced-tab/advanced-tab.component.test.js index 0a2c254df..0d09e44fd 100644 --- a/ui/pages/settings/advanced-tab/advanced-tab.component.test.js +++ b/ui/pages/settings/advanced-tab/advanced-tab.component.test.js @@ -24,7 +24,7 @@ describe('AdvancedTab Component', () => { threeBoxDisabled threeBoxSyncingAllowed={false} ledgerTransportType={LEDGER_TRANSPORT_TYPES.U2F} - setLedgerLivePreference={() => undefined} + setLedgerTransportPreference={() => undefined} setDismissSeedBackUpReminder={() => undefined} dismissSeedBackUpReminder={false} />, @@ -52,7 +52,7 @@ describe('AdvancedTab Component', () => { threeBoxDisabled threeBoxSyncingAllowed={false} ledgerTransportType={LEDGER_TRANSPORT_TYPES.U2F} - setLedgerLivePreference={() => undefined} + setLedgerTransportPreference={() => undefined} setDismissSeedBackUpReminder={() => undefined} dismissSeedBackUpReminder={false} setShowTestNetworks={toggleTestnet} diff --git a/ui/pages/settings/advanced-tab/advanced-tab.container.js b/ui/pages/settings/advanced-tab/advanced-tab.container.js index a73d93092..ed888571a 100644 --- a/ui/pages/settings/advanced-tab/advanced-tab.container.js +++ b/ui/pages/settings/advanced-tab/advanced-tab.container.js @@ -12,7 +12,7 @@ import { turnThreeBoxSyncingOnAndInitialize, setUseNonceField, setIpfsGateway, - setLedgerLivePreference, + setLedgerTransportPreference, setDismissSeedBackUpReminder, } from '../../../store/actions'; import { getPreferences } from '../../../selectors'; @@ -87,8 +87,8 @@ export const mapDispatchToProps = (dispatch) => { setIpfsGateway: (value) => { return dispatch(setIpfsGateway(value)); }, - setLedgerLivePreference: (value) => { - return dispatch(setLedgerLivePreference(value)); + setLedgerTransportPreference: (value) => { + return dispatch(setLedgerTransportPreference(value)); }, setDismissSeedBackUpReminder: (value) => { return dispatch(setDismissSeedBackUpReminder(value)); diff --git a/ui/pages/settings/advanced-tab/advanced-tab.stories.js b/ui/pages/settings/advanced-tab/advanced-tab.stories.js index 804469ce9..f72fd5d31 100644 --- a/ui/pages/settings/advanced-tab/advanced-tab.stories.js +++ b/ui/pages/settings/advanced-tab/advanced-tab.stories.js @@ -16,7 +16,7 @@ export const AdvancedTabComponent = () => { setShowTestNetworks={() => undefined} setThreeBoxSyncingPermission={() => undefined} setIpfsGateway={() => undefined} - setLedgerLivePreference={() => undefined} + setLedgerTransportPreference={() => undefined} setDismissSeedBackUpReminder={() => undefined} setUseNonceField={() => undefined} setHexDataFeatureFlag={() => undefined} diff --git a/ui/store/actions.js b/ui/store/actions.js index ac489f467..7a1a06ed7 100644 --- a/ui/store/actions.js +++ b/ui/store/actions.js @@ -2779,7 +2779,7 @@ export function getCurrentWindowTab() { }; } -export function setLedgerLivePreference(value) { +export function setLedgerTransportPreference(value) { return async (dispatch) => { dispatch(showLoadingIndication()); await promisifiedBackground.setLedgerTransportPreference(value);