# Detect a Network Change

The web application must keep track of which network Adena is connected to at all times, as Adena submits all requests to the current network. Adena provides a function to detect a change when a user tweaks the network settings in Adena.

#### Code

```javascript
adena.On("changedNetwork", (network: string) => void);
```

#### **Params**

<table><thead><tr><th width="173">Key</th><th width="313.3333333333333">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>key</code></td><td>'<code>changedNetwork'</code></td><td>The event key of '<code>changedNetwork'</code></td></tr><tr><td><code>function</code></td><td><code>(network: string) => void</code></td><td>The function that gets triggered by the event</td></tr></tbody></table>

#### Sample Request

```javascript
//this will emit a network change when the user changes the network settings on Adena
adena.On("changedNetwork", (network) => {
  console.log("changed network is " + network)
});
```

#### **Networks (chainID)**

<table><thead><tr><th width="173">ID</th><th>Network</th></tr></thead><tbody><tr><td><code>test3</code></td><td>Gnoland Network (Testnet 3)</td></tr><tr><td><code>test2</code></td><td>Gnoland Network (Testnet 2)</td></tr><tr><td><code>dev</code></td><td>Gnoland Network (Local)</td></tr></tbody></table>
