Rename the function of the Ledger preference renaming (#12459)

feature/default_network_editable
David Walsh 3 years ago committed by GitHub
parent 722c4e5b63
commit 4b1c51aec5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      ui/pages/settings/advanced-tab/advanced-tab.component.js
  2. 4
      ui/pages/settings/advanced-tab/advanced-tab.component.test.js
  3. 6
      ui/pages/settings/advanced-tab/advanced-tab.container.js
  4. 2
      ui/pages/settings/advanced-tab/advanced-tab.stories.js
  5. 2
      ui/store/actions.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

@ -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}

@ -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));

@ -16,7 +16,7 @@ export const AdvancedTabComponent = () => {
setShowTestNetworks={() => undefined}
setThreeBoxSyncingPermission={() => undefined}
setIpfsGateway={() => undefined}
setLedgerLivePreference={() => undefined}
setLedgerTransportPreference={() => undefined}
setDismissSeedBackUpReminder={() => undefined}
setUseNonceField={() => undefined}
setHexDataFeatureFlag={() => undefined}

@ -2779,7 +2779,7 @@ export function getCurrentWindowTab() {
};
}
export function setLedgerLivePreference(value) {
export function setLedgerTransportPreference(value) {
return async (dispatch) => {
dispatch(showLoadingIndication());
await promisifiedBackground.setLedgerTransportPreference(value);

Loading…
Cancel
Save