Skip to content

Commit

Permalink
docs: faq
Browse files Browse the repository at this point in the history
Signed-off-by: homura <[email protected]>
  • Loading branch information
homura committed Mar 24, 2023
1 parent b5c36ae commit fa9d6c8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# FAQ

## How To Determine if the Wallet Is Connected Successfully in the DApp?

You can call `wallet_enable` method and check if it is rejected or not.

```js
try {
await ckb.request({ method: 'wallet_enable' });
} catch {
// wallet not connected, maybe user rejected the request
console.log('wallet not connected');
}
```

0 comments on commit fa9d6c8

Please sign in to comment.