Merge pull request #226 from poanetwork/hardware-label
(Feature) Label for hardware acc
This commit is contained in:
commit
6094d02575
|
@ -117,8 +117,7 @@ class AccountDropdowns extends Component {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
ifHardwareAcc (address) {
|
ifHardwareAcc (keyring) {
|
||||||
const keyring = getCurrentKeyring(address, this.props.network, this.props.keyrings, this.props.identities)
|
|
||||||
if (keyring && keyring.type.search('Hardware') !== -1) {
|
if (keyring && keyring.type.search('Hardware') !== -1) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -130,6 +129,8 @@ class AccountDropdowns extends Component {
|
||||||
let label
|
let label
|
||||||
if (ifContractAcc(keyring)) {
|
if (ifContractAcc(keyring)) {
|
||||||
label = 'CONTRACT'
|
label = 'CONTRACT'
|
||||||
|
} else if (this.ifHardwareAcc(keyring)) {
|
||||||
|
label = 'HARDWARE'
|
||||||
} else {
|
} else {
|
||||||
label = 'IMPORTED'
|
label = 'IMPORTED'
|
||||||
}
|
}
|
||||||
|
@ -287,7 +288,7 @@ class AccountDropdowns extends Component {
|
||||||
},
|
},
|
||||||
'Copy address to clipboard',
|
'Copy address to clipboard',
|
||||||
),
|
),
|
||||||
(!this.ifHardwareAcc(selected) && !(ifContractAcc(keyring))) ? h(
|
(!this.ifHardwareAcc(keyring) && !(ifContractAcc(keyring))) ? h(
|
||||||
DropdownMenuItem,
|
DropdownMenuItem,
|
||||||
{
|
{
|
||||||
closeMenu: () => {},
|
closeMenu: () => {},
|
||||||
|
|
Loading…
Reference in New Issue