Skip to content

Commit

Permalink
fix: fixing fallback for network name
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnyhoward committed Nov 22, 2024
1 parent 72cab31 commit 1fdf1bf
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions app/components/UI/NavbarTitle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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 (
<TouchableOpacity
onPress={this.openNetworkList}
Expand Down Expand Up @@ -193,7 +182,7 @@ class NavbarTitle extends PureComponent {
]}
/>
<Text numberOfLines={1} style={styles.networkName}>
{displayName || name}
{name}
</Text>
</View>
) : null}
Expand Down

0 comments on commit 1fdf1bf

Please sign in to comment.