Skip to content

Commit

Permalink
fix: change to offline with no internet
Browse files Browse the repository at this point in the history
  • Loading branch information
juanky201271 committed Dec 9, 2024
1 parent 8e0cfba commit dd27e98
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,12 @@ const Settings: React.FunctionComponent<SettingsProps> = ({
}

if (serverContext.uri !== serverUriParsed || serverContext.chainName !== chainNameParsed) {
if (!netInfo.isConnected) {
// if the user is changing -> to Offline mode.
// doesn't matter is the device have or not internet connection.
if (
!netInfo.isConnected &&
!(selectServerContext !== SelectServerEnum.offline && selectServer === SelectServerEnum.offline)
) {
addLastSnackbar({ message: translate('loadedapp.connection-error') as string });
return;
}
Expand Down

0 comments on commit dd27e98

Please sign in to comment.