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,
|
type: KeyringType.ledger,
|
||||||
accounts: [
|
accounts: ['0x9d0ba4ddac06032527b140912ec808ab9451b788'],
|
||||||
'0x9d0ba4ddac06032527b140912ec808ab9451b788'
|
},
|
||||||
],
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
networkConfigurations: {
|
networkConfigurations: {
|
||||||
'test-networkConfigurationId-1': {
|
'test-networkConfigurationId-1': {
|
||||||
|
@ -30,10 +30,8 @@ import {
|
|||||||
Size,
|
Size,
|
||||||
BorderColor,
|
BorderColor,
|
||||||
} from '../../../helpers/constants/design-system';
|
} from '../../../helpers/constants/design-system';
|
||||||
import {
|
import { HardwareKeyringNames } from '../../../../shared/constants/hardware-wallets';
|
||||||
HardwareKeyringTypes,
|
import { KeyringType } from '../../../../shared/constants/keyring';
|
||||||
HardwareKeyringNames,
|
|
||||||
} from '../../../../shared/constants/hardware-wallets';
|
|
||||||
import UserPreferencedCurrencyDisplay from '../../app/user-preferenced-currency-display/user-preferenced-currency-display.component';
|
import UserPreferencedCurrencyDisplay from '../../app/user-preferenced-currency-display/user-preferenced-currency-display.component';
|
||||||
import { SECONDARY, PRIMARY } from '../../../helpers/constants/common';
|
import { SECONDARY, PRIMARY } from '../../../helpers/constants/common';
|
||||||
import { findKeyringForAddress } from '../../../ducks/metamask/metamask';
|
import { findKeyringForAddress } from '../../../ducks/metamask/metamask';
|
||||||
@ -45,15 +43,15 @@ const MAXIMUM_CHARACTERS_WITHOUT_TOOLTIP = 17;
|
|||||||
function getLabel(keyring = {}, t) {
|
function getLabel(keyring = {}, t) {
|
||||||
const { type } = keyring;
|
const { type } = keyring;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case HardwareKeyringTypes.qr:
|
case KeyringType.qr:
|
||||||
return HardwareKeyringNames.qr;
|
return HardwareKeyringNames.qr;
|
||||||
case HardwareKeyringTypes.imported:
|
case KeyringType.imported:
|
||||||
return t('imported');
|
return t('imported');
|
||||||
case HardwareKeyringTypes.trezor:
|
case KeyringType.trezor:
|
||||||
return HardwareKeyringNames.trezor;
|
return HardwareKeyringNames.trezor;
|
||||||
case HardwareKeyringTypes.ledger:
|
case KeyringType.ledger:
|
||||||
return HardwareKeyringNames.ledger;
|
return HardwareKeyringNames.ledger;
|
||||||
case HardwareKeyringTypes.lattice:
|
case KeyringType.lattice:
|
||||||
return HardwareKeyringNames.lattice;
|
return HardwareKeyringNames.lattice;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
@ -212,7 +210,7 @@ export const AccountListItem = ({
|
|||||||
blockExplorerUrlSubTitle={blockExplorerUrlSubTitle}
|
blockExplorerUrlSubTitle={blockExplorerUrlSubTitle}
|
||||||
identity={identity}
|
identity={identity}
|
||||||
onClose={() => setAccountOptionsMenuOpen(false)}
|
onClose={() => setAccountOptionsMenuOpen(false)}
|
||||||
isRemovable={keyring?.type !== HardwareKeyringTypes.hdKeyTree}
|
isRemovable={keyring?.type !== KeyringType.hdKeyTree}
|
||||||
closeMenu={closeMenu}
|
closeMenu={closeMenu}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
|
Loading…
Reference in New Issue
Block a user