Skip to content

Commit

Permalink
setLedgerTransportPreference in the metamask-controller should not be…
Browse files Browse the repository at this point in the history
… called, or should return immediately, if canUseHardwareWallets() is false

Signed-off-by: Akintayo A. Olusegun <[email protected]>
  • Loading branch information
segun committed Jan 25, 2023
1 parent 90dee4d commit 5360f6a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -4415,6 +4415,10 @@ export default class MetamaskController extends EventEmitter {
* @param {string} transportType - The Ledger transport type.
*/
async setLedgerTransportPreference(transportType) {
if (!this.canUseHardwareWallets()) {
return undefined;
}

const currentValue =
this.preferencesController.getLedgerTransportPreference();
const newValue =
Expand Down

0 comments on commit 5360f6a

Please sign in to comment.