mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
updated keyringType (#18273)
This commit is contained in:
parent
c079c4320e
commit
cedef121a3
@ -1182,11 +1182,9 @@ const state = {
|
||||
],
|
||||
},
|
||||
{
|
||||
type: HardwareKeyringTypes.ledger,
|
||||
accounts: [
|
||||
'0x9d0ba4ddac06032527b140912ec808ab9451b788'
|
||||
],
|
||||
}
|
||||
type: KeyringType.ledger,
|
||||
accounts: ['0x9d0ba4ddac06032527b140912ec808ab9451b788'],
|
||||
},
|
||||
],
|
||||
networkConfigurations: {
|
||||
'test-networkConfigurationId-1': {
|
||||
|
@ -30,10 +30,8 @@ import {
|
||||
Size,
|
||||
BorderColor,
|
||||
} from '../../../helpers/constants/design-system';
|
||||
import {
|
||||
HardwareKeyringTypes,
|
||||
HardwareKeyringNames,
|
||||
} from '../../../../shared/constants/hardware-wallets';
|
||||
import { HardwareKeyringNames } from '../../../../shared/constants/hardware-wallets';
|
||||
import { KeyringType } from '../../../../shared/constants/keyring';
|
||||
import UserPreferencedCurrencyDisplay from '../../app/user-preferenced-currency-display/user-preferenced-currency-display.component';
|
||||
import { SECONDARY, PRIMARY } from '../../../helpers/constants/common';
|
||||
import { findKeyringForAddress } from '../../../ducks/metamask/metamask';
|
||||
@ -45,15 +43,15 @@ const MAXIMUM_CHARACTERS_WITHOUT_TOOLTIP = 17;
|
||||
function getLabel(keyring = {}, t) {
|
||||
const { type } = keyring;
|
||||
switch (type) {
|
||||
case HardwareKeyringTypes.qr:
|
||||
case KeyringType.qr:
|
||||
return HardwareKeyringNames.qr;
|
||||
case HardwareKeyringTypes.imported:
|
||||
case KeyringType.imported:
|
||||
return t('imported');
|
||||
case HardwareKeyringTypes.trezor:
|
||||
case KeyringType.trezor:
|
||||
return HardwareKeyringNames.trezor;
|
||||
case HardwareKeyringTypes.ledger:
|
||||
case KeyringType.ledger:
|
||||
return HardwareKeyringNames.ledger;
|
||||
case HardwareKeyringTypes.lattice:
|
||||
case KeyringType.lattice:
|
||||
return HardwareKeyringNames.lattice;
|
||||
default:
|
||||
return null;
|
||||
@ -212,7 +210,7 @@ export const AccountListItem = ({
|
||||
blockExplorerUrlSubTitle={blockExplorerUrlSubTitle}
|
||||
identity={identity}
|
||||
onClose={() => setAccountOptionsMenuOpen(false)}
|
||||
isRemovable={keyring?.type !== HardwareKeyringTypes.hdKeyTree}
|
||||
isRemovable={keyring?.type !== KeyringType.hdKeyTree}
|
||||
closeMenu={closeMenu}
|
||||
/>
|
||||
) : null}
|
||||
|
Loading…
Reference in New Issue
Block a user