> ## Documentation Index
> Fetch the complete documentation index at: https://docs.endstate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# wallet.destroy

> Ends the session and removes the frame. Safe to call more than once.

```ts theme={null}
destroy(): Promise<void>
```

Ends the session and removes the frame. Safe to call more than once - a second call is a no-op. Any pending [`ready()`](/sdks/web/reference/wallet/ready) or [`refreshSession()`](/sdks/web/reference/wallet/refreshSession) settles with `wallet.destroyed`, and [`account()`](/sdks/web/reference/wallet/account) and [`sessionExpiresAt()`](/sdks/web/reference/wallet/sessionExpiresAt) return to `null`. Call it on teardown of the view that owns the wallet, so a component that unmounts mid-handshake leaves no promise pending and no frame listener attached.

## Example

```ts theme={null}
await wallet.destroy();
```
