diff options
Diffstat (limited to 'ui/app/selectors.js')
-rw-r--r-- | ui/app/selectors.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/app/selectors.js b/ui/app/selectors.js index 8259bb052..f1ef41f28 100644 --- a/ui/app/selectors.js +++ b/ui/app/selectors.js @@ -36,10 +36,17 @@ const selectors = { preferencesSelector, getMetaMaskAccounts, getCurrentEthBalance, + getNetworkIdentifier, } module.exports = selectors +function getNetworkIdentifier (state) { + const { metamask: { provider: { type, nickname, rpcTarget } } } = state + + return nickname || rpcTarget || type +} + function getSelectedAddress (state) { const selectedAddress = state.metamask.selectedAddress || Object.keys(getMetaMaskAccounts(state))[0] |