# switchWalletAccount

Allows NeoLine applications ('dapps') to request that the wallet switches its active account.

## **Input Arguments**

None

## **Success Response**

<table><thead><tr><th width="304">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>address: string</code></td><td>Address of the connected account</td></tr><tr><td><code>label?: string</code></td><td>A label the users has set to identify their wallet</td></tr><tr><td><code>isLedger: boolean</code></td><td>Whether the connected account is a ledger account</td></tr></tbody></table>

## **Error Response**

<table><thead><tr><th width="308">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>type: string</code></td><td>The type of error which has occured</td></tr><tr><td><code>description: string</code></td><td>A description of the error which has occured</td></tr><tr><td><code>data: string</code></td><td>Any raw data associated with the error</td></tr></tbody></table>

## Example

### Request

```js
neoline.switchWalletAccount()
.then(account => {
  const {
    address,
    label,
    isLedger
  } = account;

  console.log('Provider address: ' + address);
  console.log('Provider account label (Optional): ' + label);
  console.log('Provider account is ledger account: ' + isLedger);
})
.catch((error) => {
  const {type, description, data} = error;
  switch(type) {
    case UNKNOWN_ERROR:
        console.log(description);
        break;
    default:
        // Not an expected error object.  Just write the error to the console.
        console.error(error);
        break;
  }
});
```

### Response

```js
{
  address: 'AWSEU4BXpjGVdw9ajnFBXh8Rg8cgw9f3Zo',
  label: 'NEOLine',
  isLedger: false
}
```
