Skip to content

Commit 2ad3e24

Browse files
authored
Edit the embedded wallets React builder component. (#2292)
* Edit the React builder component. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Typo. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> --------- Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>
1 parent d966333 commit 2ad3e24

File tree

9 files changed

+47
-29
lines changed

9 files changed

+47
-29
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
### Configure Web3Auth
22

3-
Create a basic config for Web3Auth and pass the `clientId` & `web3AuthNetwork` from your Web3Auth Dashboard Project Settings.
3+
Create a basic Web3Auth configuration and pass the client ID and network details from your project
4+
settings in the Web3Auth dashboard.
45

56
:::info
67

7-
This is where you can also configure any major settings of your integration as well. Visit our [**configuration section**](/embedded-wallets/sdk/react) of the sdk reference to learn more about the different options available.
8+
Configure other major settings here as needed.
9+
See the [configuration section](/embedded-wallets/sdk/react/advanced/) for available options.
810

911
:::

src/pages/quickstart/builder/embedded-wallets/react/stepContent/installation.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
### Install MetaMask Embedded Wallet SDK
1+
### Install MetaMask Embedded Wallets SDK
22

3-
Install the Web3Auth React SDK package in your project.
3+
Install the MetaMask Embedded Wallets SDK (Web3Auth) package in your project.
44

55
Additionally, for blockchain calls, we're using `wagmi` for this example.
66

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
### Logging in your User
1+
### Sign in the user
22

3-
Use the `useWeb3AuthConnect` hook to get access to the login functionality. The modal will prompt the user to login with their wallet and handle the authentication for you.
3+
Use the [`useWeb3AuthConnect` hook](/embedded-wallets/sdk/react/hooks/useWeb3AuthConnect) to access
4+
the login functionality. The modal prompts the user to sign in with their wallet and
5+
handles the authentication.
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
### Log the user out
1+
### Sign out the user
22

3-
Use the `useWeb3AuthDisconnect` hook to log the user out. This will also delete the session information from the local storage of the browser.
3+
Use the [`useWeb3AuthDisconnect` hook](/embedded-wallets/sdk/react/hooks/useWeb3AuthDisconnect) to
4+
sign out the user. This also clears the session information from the browser's local storage.
45

56
:::info
67

7-
There are multiple other hooks available in the Web3Auth React SDK. Visit our [**hooks section**](/embedded-wallets/sdk/react/hooks) of the sdk reference to learn more about the different hooks available.
8+
The React SDK provides additional hooks.
9+
See the [hooks reference](/embedded-wallets/sdk/react/hooks) for more information.
810

911
:::
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
### Troubleshooting
22

3-
While using any web3 library in React, you may run into issues building. This issue occurs because some core packages like `eccrypto` have certain dependencies which are not present within the browser build environment.
3+
When using web3 libraries in React, you may encounter build errors. This happens because some packages
4+
(for example, `eccrypto`) depend on Node.js modules that aren't available in the browser build
5+
environment.
46

5-
To solve this, please have a look at our troubleshooting pages about [Vite Issues](/troubleshooting/vite-issues)
7+
To resolve these errors, see the [Vite issues](/embedded-wallets/troubleshooting/vite-issues/) page.
68

79
:::info
810

9-
If you face any problem anytime, you can always find help in the [**Web3Auth Community**](https://web3auth.io/community/c/help-pnp/pnp-web/7).
11+
If you need help, visit the [**Web3Auth community**](https://web3auth.io/community/c/help-pnp/pnp-web/7).
1012

1113
:::
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
### MetaMask Embedded Wallets Quick Start
1+
### MetaMask Embedded Wallets React quickstart
22

3-
Add social login and wallet connection functionality to your React app using the MetaMask Embedded Wallet SDKs.
3+
Add social login and wallet connection functionality to your React app with the MetaMask
4+
Embedded Wallets SDK (Web3Auth).
45

5-
Clone the Quick Start in your terminal.
6+
To view the quickstart for a different platform, select the dropdown in the menu bar and choose
7+
your target platform. For example, Android, Flutter, Angular, iOS,and others.
8+
9+
Clone the quickstart:
610

711
```bash
812
npx degit Web3Auth/web3auth-examples/quick-starts/react-quick-start w3a-quick-start
913
```
14+
15+
If you need help, visit the [Web3Auth community](https://web3auth.io/community/).
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
### Setup Wagmi Provider
1+
### Set up the Wagmi provider
22

3-
Since we're using `wagmi` for this example, we need to setup the `WagmiProvider` component. Please use the `WagmiProvider` component from `@web3auth/modal/react/wagmi` to wrap your application.
3+
Since this example uses `wagmi`, wrap your app with the `WagmiProvider` from
4+
`@web3auth/modal/react/wagmi`.
45

56
```tsx
67
import { WagmiProvider } from '@web3auth/modal/react/wagmi'
78
```
89

9-
> Apart from that, the standard wagmi setup is being used. You do not need to create any wagmi config, since the Web3Auth config is being used directly. Refer to the [wagmi docs](https://wagmi.sh/react/getting-started) for more information.
10+
This example uses the standard Wagmi setup. You don't need to create a Wagmi config; the Web3Auth
11+
config is used directly. See the [Wagmi docs](https://wagmi.sh/react/getting-started) for more
12+
information.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
### Setup Web3Auth Provider
1+
### Set up the Web3Auth provider
22

3-
To enable the hooks across your application, you need to wrap your application with the `Web3AuthProvider` component. This involves using the configuration created in the previous step.
3+
Wrap your app with the `Web3AuthProvider` to enable hooks across your application. Use the configuration
4+
from the previous step.
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
### Making Blockchain Calls
1+
### Make blockchain calls
22

3-
Since Wagmi is configured in this application, you can directly use the wagmi hooks to make blockchain calls. We have demonstrated some commonly used hooks like `useBalance`, `useAccount`, `useSignMessage`, `useSendTransaction` and `useSwitchChain`.
3+
Because Wagmi is configured in this application, you can use Wagmi hooks to make
4+
blockchain calls. This example demonstrates common hooks:
5+
`useBalance`, `useAccount`, `useSignMessage`, `useSendTransaction`, and `useSwitchChain`.
46

5-
:::info
7+
See the [Wagmi documentation](https://wagmi.sh/react/api/hooks) for more information on the
8+
hooks.
69

7-
You can refer to the [**wagmi docs**](https://wagmi.sh/react/api/hooks) for more information on the hooks.
10+
:::tip Connect any blockchain
811

9-
:::
10-
11-
:::tip Other Blockchains
12-
13-
Web3Auth supports all blockchains. Have a look at our [Connect Blockchain](/connect-blockchain/) section of the documentation and choose your blockchain to get started.
12+
Refer to the [blockchain documentation](/embedded-wallets/connect-blockchain)
13+
to learn more about making calls on any supported blockchain.
1414

1515
:::

0 commit comments

Comments
 (0)