-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
84 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ In this article, we will go through the development of a simple [Web3Modal](http | |
|
||
### Create a simple React app | ||
|
||
To start, let's create a React application by using `create-react-app`. Of course, you can just use your already existing codebase instead, we're doing this just for demonstration purposes. | ||
To start, let's create a React application by using `create-react-app`. Of course, you can use your existing codebase instead. We're doing this just for demonstration purposes. | ||
You will need to run in your terminal: | ||
|
||
```bash | ||
|
@@ -16,18 +16,18 @@ cd aurora-pass-example | |
npm start | ||
``` | ||
|
||
Your React app will be running now at `http://localhost:3000`, just open that link in your browser to see the UI. | ||
You can read more about the `create-react-app` [here](https://create-react-app.dev/docs/getting-started/), in case you want to learn more details. | ||
Your React app will be running now at `http://localhost:3000`. Just open that link in your browser to see the UI. | ||
You can read more about the `create-react-app` [here](https://create-react-app.dev/docs/getting-started/) for more details. | ||
|
||
### Add Aurora Promo Widget | ||
|
||
We have talked about the Promo Widget [before](/onboard/promo-widget), but now it is time to try it in practice. | ||
You need to follow the code [here](/onboard/promo-widget) to add the Promo Widget popup to your DApp. | ||
We have discussed the Promo Widget [before](/onboard/promo-widget), but now it is time to try it in practice. | ||
You need to look at the code [here](/onboard/promo-widget) to add the Promo Widget popup to your DApp. | ||
After this, we can add Web3Modal to the project. | ||
|
||
### Adding Web3Modal | ||
|
||
We will follow the [Web3Model Wagmi v2 documentation](https://docs.walletconnect.com/web3modal/react/about?platform=wagmi) closely here. | ||
We will closely follow the [Web3Model Wagmi v2 documentation](https://docs.walletconnect.com/web3modal/react/about?platform=wagmi) here. | ||
|
||
#### Import libraries and get projectId | ||
|
||
|
@@ -37,7 +37,7 @@ First, let's add some new packages to the project: | |
npm install @web3modal/[email protected] wagmi viem @tanstack/react-query | ||
``` | ||
|
||
Let's sign up now at [WalletConnect Cloud](https://cloud.walletconnect.com/sign-in) to get a WalletConnect `projectId`. You will get some random string like `4aee871f7a80f1ff5c7892226bd3ascd`. | ||
Now, sign up at [WalletConnect Cloud](https://cloud.walletconnect.com/sign-in) to get a WalletConnect `projectId`. You will get some random string like `4aee871f7a80f1ff5c7892226bd3ascd`. | ||
|
||
#### Add Web3Modal component | ||
|
||
|
@@ -84,7 +84,7 @@ export default function Web3Modal({ children }) { | |
} | ||
``` | ||
|
||
Now, we can use the Web3Modal component in our App. First of all, notice that we need to wrap into it the part of the App using the `wagmi` hooks. In this case, we wrapping it fully into it: | ||
Now, we can use the Web3Modal component in our app. First, notice that we need to wrap the part of the app into it using the `wagmi` hooks. In this case, we are wrapping it fully into it: | ||
|
||
```jsx title="aurora-pass-example/src/App.js" | ||
|
||
|
@@ -103,12 +103,12 @@ function App() { | |
} | ||
``` | ||
|
||
But we haven't displayed the popup yet. How can we do it? | ||
But we still need to display the popup. How can we do it? | ||
|
||
#### Displaying Web3Modal | ||
|
||
To open the wallets popup, let's use `useWeb3Modal` hook inside the App component, to be more specific – the `open` function it provides. | ||
We also need to edit a bit our old `openWidget` function to accept `onComplete` argument, and pass there the `open` function: | ||
To open the wallets popup, let's use the `useWeb3Modal` hook inside the App component, to be more specific – the `open` function it provides. | ||
We also need to edit a bit our old `openWidget` function to accept the `onComplete` argument and pass there the `open` function: | ||
|
||
```jsx title="aurora-pass-example/src/App.js" | ||
import { useWeb3Modal } from '@web3modal/wagmi/react'; | ||
|
@@ -143,13 +143,13 @@ function App() { | |
} | ||
``` | ||
|
||
You can also safely remove the `openWeb3Modal` function we have had previously with just a placeholder alert in there. | ||
You can also safely remove the `openWeb3Modal` function we previously had with just a placeholder alert. | ||
|
||
If you go into your App now, you will be able to see the WalletConnect popup appearing after you click 'Skip' button in the AuroraPass widget: | ||
If you go into your App now, you will be able to see the WalletConnect popup appearing after you click the 'Skip' button in the AuroraPass widget: | ||
|
||
![wc_default_modal](/img/wc_default_modal.png) | ||
|
||
But, it won't contain the AuroraPass yet. Let's add it there. | ||
But it will still need to contain the AuroraPass. Let's add it there. | ||
|
||
### Add AuroraPass to your wallet list | ||
|
||
|
@@ -172,11 +172,11 @@ If we re-open the Web3Modal now, we will see the AuroraPass wallet there: | |
|
||
![wc_ap_visible](/img/wc_ap_visible.png) | ||
|
||
Now, we can try connecting our wallet, via the QR code: | ||
Now, we can try connecting our wallet via the QR code: | ||
|
||
![wc_ap_qr](/img/wc_ap_qr.png) | ||
|
||
But we won't see if the connection was successful yet, because we don't have anything to display that. The popup will just close and we will see the App's initial screen: | ||
But we won't see if the connection was successful yet because we need something to display that. The popup will close, and we will see the App's initial screen: | ||
|
||
![wc_ap_connected_no_ui](/img/wc_ap_connected_no_ui.png) | ||
|
||
|
@@ -228,4 +228,4 @@ And the corresponding account after we've connected via the Web3Modal to the DAp | |
|
||
Congratulations on completing your first AuroraPass integration! | ||
|
||
If you still have some questions, please contact our team via [Discord](https://discord.com/invite/dEFJBz8HQV) by opening a support ticket there. | ||
If you still have questions, please get in touch with our [Support Team](https://discord.com/invite/dEFJBz8HQV) by opening a support ticket there. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,58 @@ | ||
--- | ||
title: Troubleshooting | ||
title: Troubleshooting | ||
--- | ||
|
||
### I have sent my tokens to the wrong wallet - can I recover them? | ||
|
||
Aurora Pass does not currently support other EVM chains and L2s, except Aurora and Aurora Chains. | ||
Sometimes by mistake, users can send assets to their address on those non-supported networks instead. | ||
Sometimes, by mistake, users can send assets to their address on those non-supported networks instead. | ||
|
||
E.g, suppose you have sent your assets to some of your Ethereum addresses. | ||
E.g., suppose you have sent your assets to some of your Ethereum addresses. | ||
|
||
Then, if you have a private key of that address or a seed phrase - these tokens can be easily recovered by importing your address into a compatible wallet, e.g., MetaMask. | ||
After that, you will be able to bridge them back from Aurora to your Ethereum address. Or transfer the tokens to any other address on Aurora, like your AuroraPass address. | ||
These tokens can be quickly recovered by importing your address into a compatible wallet, e.g., MetaMask, using your private key or a seed phrase. | ||
After that, you can bridge them back from Aurora to your Ethereum address. Or transfer the tokens to any other address on Aurora, like your AuroraPass address. | ||
|
||
In case if you have transferred them to a CEX address, you won't be able to recover these tokens, if that CEX doesn't support Aurora yet. Currently, we support Coinbase, KuCoin and Gate.io CEXes. | ||
If you have transferred them to a CEX address, you can only recover these tokens if that CEX supports Aurora later. Currently, we support Coinbase, KuCoin, and Gate.io CEXes. | ||
|
||
### I can't find the token [XYZ] in my wallet – can I add it somehow? | ||
|
||
- If you are a developer, please add a PR to [this repository](https://github.com/aurora-is-near/bridge-assets) following [this example](https://github.com/aurora-is-near/bridge-assets/pull/273/files). | ||
- If you are a user, please contact our [Support Team](https://discord.gg/dEFJBz8HQV) via Discord and we will help you to resolve this issue. | ||
- If you are a user, don't hesitate to get in touch with our [Support Team](https://discord.gg/dEFJBz8HQV) via Discord, and we will help you resolve this issue. | ||
|
||
### I have paid for my transaction pack but got no transactions added | ||
|
||
Please, contact our [Support [Team](https://discord.gg/dEFJBz8HQV), and we will help you to get your transaction pack. | ||
Please get in touch with our [Support Team](https://discord.gg/dEFJBz8HQV), and we will help you get your transaction pack. | ||
|
||
### I can't see my balances in Aurora Pass | ||
|
||
Sometimes such a situation could happen because of some local restrictions in your country of residence. Please, try using another internet connection or VPN to solve the issue. | ||
Sometimes, such a situation could happen because of local restrictions in your country of residence. Try using another internet connection or VPN to solve the issue. | ||
|
||
### I get the 'Pairing failed: Pairing already exists' error while connecting to a DApp | ||
|
||
This error looks like this: | ||
![ap_pairing_error.png](/img/ap_pairing_error.png) | ||
|
||
This error means that DApp is already using some existing pairing but the wallet doesn't know it was disconnected, so there is some non-sync state between them. | ||
This error means that DApp is already using some existing pairing, but the wallet doesn't know it was disconnected, so there is some non-sync state between them. | ||
|
||
To fix it, please try to follow the next steps: | ||
|
||
1. Try to disconnect all previously connected wallets from that DApp. | ||
2. Re-connect with your AuroraPass wallet to a DApp. | ||
|
||
In case the problem persists, please contact our [Support Team](https://discord.gg/dEFJBz8HQV). | ||
If the problem persists, please get in touch with our [Support Team](https://discord.gg/dEFJBz8HQV). | ||
|
||
### I see symbols like 0xab4... during signing a DApp transaction in Aurora Pass - what do they mean? | ||
### I see symbols like 0xab4... while signing a DApp transaction in Aurora Pass - what do they mean? | ||
|
||
If you are a user, please contact either the DApp support team or the [Aurora Support Team](https://discord.gg/dEFJBz8HQV) and ask them to verify the contracts used in that DApp. | ||
If you are a user, don't hesitate to get in touch with either the DApp support team or the [Aurora Support Team](https://discord.gg/dEFJBz8HQV) and ask them to verify the contracts used in that DApp. | ||
|
||
If you are a developer, make sure to verify your DApp contracts in [Aurora Explorer](https://explorer.aurora.dev/). | ||
This will make sure that a user sees nicely formatted information - function name and its arguments' names while using the Aurora Pass wallet. | ||
If you are a developer, verify your DApp contracts in [Aurora Explorer](https://explorer.aurora.dev/). We're using Blockscout | ||
so that you can read more about it [here](https://docs.blockscout.com/for-users/verifying-a-smart-contract). | ||
Verifying your contracts will ensure that a user sees nicely formatted information - function name and its arguments' names while using the Aurora Pass wallet. | ||
|
||
In the case of having a non-verified contract, a user will see a non-decoded function name and arguments, which will look incomprehensible and unclear. | ||
In a non-verified contract, a user will see a non-decoded function name and arguments, which will look incomprehensible and unclear. | ||
|
||
So, we advise you to verify all (or most) of your contracts, which gives your users a better understanding of their interactions with your product via Aurora Pass. | ||
We advise you to verify all (or most) of your contracts, which gives your users a better understanding of their interactions with your product via Aurora Pass. | ||
|
||
### I have a problem, which is not on the list | ||
### I have a problem which is not on the list | ||
|
||
Please, contact our [Support Team](https://discord.gg/dEFJBz8HQV) on Discord and open a ticket describing your problem. | ||
Please get in touch with our [Support Team](https://discord.gg/dEFJBz8HQV) on Discord and open a ticket describing your problem. |
Oops, something went wrong.