From 1fdf1bf7674b1147b624600b1c1174b2601f286f Mon Sep 17 00:00:00 2001 From: vinnyhoward Date: Fri, 22 Nov 2024 16:57:42 -0700 Subject: [PATCH] fix: fixing fallback for network name --- app/components/UI/NavbarTitle/index.js | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/app/components/UI/NavbarTitle/index.js b/app/components/UI/NavbarTitle/index.js index 3b7b1a46894..aa7e1388914 100644 --- a/app/components/UI/NavbarTitle/index.js +++ b/app/components/UI/NavbarTitle/index.js @@ -144,7 +144,9 @@ class NavbarTitle extends PureComponent { const colors = this.context.colors || mockTheme.colors; const styles = createStyles(colors); - if (providerConfig.nickname) { + if (networkName) { + name = networkName; + } else if (providerConfig.nickname) { name = providerConfig.nickname; } else { name = @@ -153,19 +155,6 @@ class NavbarTitle extends PureComponent { } const realTitle = translate ? strings(title) : title; - let displayName = networkName; - - if (!displayName) { - if (providerConfig.nickname) { - displayName = providerConfig.nickname; - } else { - displayName = - (Networks[providerConfig.type] && - Networks[providerConfig.type].name) || - { ...Networks.rpc, color: null }.name; - } - } - return ( - {displayName || name} + {name} ) : null}