File tree 2 files changed +14
-2
lines changed
packages/scaffold/src/views
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,13 @@ export function AccountDefaultView() {
146
146
} ;
147
147
148
148
const onNetworkPress = ( ) => {
149
- RouterController . push ( 'Networks' ) ;
149
+ const isNetworkSupported = NetworkController . isActiveNetworkInRequestedNetworks ( ) ;
150
+
151
+ if ( AccountController . state . isConnected && ! isNetworkSupported ) {
152
+ RouterController . push ( 'UnsupportedChain' ) ;
153
+ } else {
154
+ RouterController . push ( 'Networks' ) ;
155
+ }
150
156
151
157
EventsController . sendEvent ( {
152
158
type : 'track' ,
Original file line number Diff line number Diff line change @@ -39,7 +39,13 @@ export function AccountView() {
39
39
} ;
40
40
41
41
const onNetworkPress = ( ) => {
42
- RouterController . push ( 'Networks' ) ;
42
+ const isNetworkSupported = NetworkController . isActiveNetworkInRequestedNetworks ( ) ;
43
+
44
+ if ( AccountController . state . isConnected && ! isNetworkSupported ) {
45
+ RouterController . push ( 'UnsupportedChain' ) ;
46
+ } else {
47
+ RouterController . push ( 'Networks' ) ;
48
+ }
43
49
} ;
44
50
45
51
const onActivatePress = ( ) => {
You can’t perform that action at this time.
0 commit comments