Ensure ledger transport preference is set on import (#12557)

feature/default_network_editable
Dan J Miller 3 years ago committed by GitHub
parent 803576c7d7
commit 401c8ee7b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      app/scripts/metamask-controller.js

@ -1317,6 +1317,13 @@ export default class MetamaskController extends EventEmitter {
accounts = await keyringController.getAccounts();
}
// This must be set as soon as possible to communicate to the
// keyring's iframe and have the setting initialized properly
// Optimistically called to not block Metamask login due to
// Ledger Keyring GitHub downtime
const transportPreference = this.preferencesController.getLedgerTransportPreference();
this.setLedgerTransportPreference(transportPreference);
// set new identities
this.preferencesController.setAddresses(accounts);
this.selectFirstIdentity();

Loading…
Cancel
Save