aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/selectors.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/selectors.js')
-rw-r--r--ui/app/selectors.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/app/selectors.js b/ui/app/selectors.js
index 8259bb052..10bf63975 100644
--- a/ui/app/selectors.js
+++ b/ui/app/selectors.js
@@ -36,10 +36,18 @@ 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]