Skip to content

Commit 989069d

Browse files
committed
docs: update
1 parent 15470e0 commit 989069d

File tree

4 files changed

+72
-4
lines changed

4 files changed

+72
-4
lines changed

Diff for: app/content/development.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Development
2+
3+
## If you update the Wallet state, you also need to update the follows:
4+
5+
- core/src/types/wallet.ts -> type Wallet
6+
- core/src/store.ts -> wallet
7+
- core/src/services/connect.ts -> resetWallet
8+
- core/src/services/connect.ts -> return Computed
9+
- core/src/types/listeners.ts -> type ConnWallet
10+
- core/src/utils/assert.ts -> assertConnected
11+
12+
docs updates
13+
- app/content/en/overview.md -> Wallet & isConnected
14+
- app/content/zh-TW/overview.md -> Wallet & isConnected
15+
16+
17+
## Git Commit Convention
18+
19+
If changes affect functionality within the packages, they will be merged using the Github Pull Request. Otherwise, updates for the website (app) or documentations will be pushed directly to the main branch.

Diff for: app/content/en/overview.md

+43
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,50 @@ console.log(error.value)
4343
console.log(chainId.value)
4444
```
4545

46+
## Connect
4647

48+
The following explanation can help you better understand how `<VueDappModal>` connects to the wallet.
49+
50+
(If you're using `<VueDappModal>`, the following code snippet may not be necessary as `<VueDappModal>` handles this functionality for you. )
51+
52+
```ts
53+
const { connectTo } = useVueDapp()
54+
```
55+
56+
You can connect to a specific connector as follows:
57+
58+
```ts
59+
connectTo("BrowserWallet", options)
60+
connectTo("WalletConnect", undefined)
61+
connectTo("CoinbaseWallet", undefined)
62+
```
63+
64+
When connecting to a browser wallet, you have the option to use the RDNS specified in EIP-6963 for connection, or use the traditional `window.ethereum`.
65+
66+
```ts
67+
export enum RdnsEnum {
68+
'rabby' = 'io.rabby',
69+
'metamask' = 'io.metamask',
70+
'brave' = 'com.brave.wallet',
71+
'coinbase' = 'com.coinbase.wallet',
72+
'bitget' = 'com.bitget.web3wallet',
73+
}
74+
75+
export type RDNS = string
76+
```
77+
78+
When a dapp is opened in a browser with wallet extensions installed, the provider can be obtained according to the EIP-6963. However, when the dapp is opened within a dapp browser built into a mobile wallet app, `window.ethereum` is used to obtain the provider.
79+
80+
```ts
81+
connectTo("BrowserWallet", {
82+
target: "rdns",
83+
rdns: RdnsEnum.rabby
84+
})
85+
86+
connectTo("BrowserWallet", {
87+
target: "window.ethereum",
88+
})
89+
```
4790

4891

4992

Diff for: app/content/specifications.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Specifications
2+
3+
Record of version for significant updates and their corresponding features. For detailed information, please refer to the GitHub release notes.
4+
5+
## v1.3.0
6+
7+
- [Release](https://github.com/vu3th/vue-dapp/releases/tag/v1.3.0)
8+
- [Enable dapp browser in mobile wallet](https://github.com/vu3th/vue-dapp/issues/171)
9+
- [Ensure correct disconnection when browser wallet disconnects manually](https://github.com/vu3th/vue-dapp/pull/175)
10+

Diff for: packages/modal/development.md

-4
This file was deleted.

0 commit comments

Comments
 (0)