Skip to content

Commit

Permalink
Merge pull request #74 from reown-com/fix/several-fix-over-docs
Browse files Browse the repository at this point in the history
fix: Several issues on docs
  • Loading branch information
rohit-710 authored Sep 27, 2024
2 parents 249aabc + 3c9eac9 commit b4e72e2
Show file tree
Hide file tree
Showing 21 changed files with 64 additions and 104 deletions.
1 change: 0 additions & 1 deletion docs/appkit/javascript/core/custom-connectors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export const wagmiAdapter = new WagmiAdapter({
connectors,
projectId,
networks

})

export const config = wagmiAdapter.wagmiConfig
Expand Down
9 changes: 3 additions & 6 deletions docs/appkit/javascript/ethers/about/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,17 @@ import { mainnet, arbitrum } from '@reown/appkit/networks'
// 1. Get projectId from https://cloud.reown.com
const projectId = 'YOUR_PROJECT_ID'

// 2. Set up Ethers adapter
const ethersAdapter = new EthersAdapter()

// 3. Create your application's metadata object
// 2. Create your application's metadata object
const metadata = {
name: 'AppKit',
description: 'AppKit Example',
url: 'https://reown.com/appkit', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}

// 4. Create a AppKit instance
// 3. Create a AppKit instance
const modal = createAppKit({
adapters: [ethersAdapter],
adapters: [new EthersAdapter()],
networks: [mainnet, arbitrum],
metadata,
projectId,
Expand Down
11 changes: 4 additions & 7 deletions docs/appkit/javascript/ethers5/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,24 @@ import TabItem from '@theme/TabItem'
In your `main.js` file set up the following configuration.

```ts
import { createAppKit } from '@reown/appkit'
import { Ethers5Adapter } from '@reown/appkit-adapter-ethers5'
import { mainnet, arbitrum } from '@reown/appkit/networks'
import { createAppKit } from '@reown/appkit'

// 1. Get projectId at https://cloud.reown.com
const projectId = 'YOUR_PROJECT_ID'

// 2. Create the Ethers5 Adapter
const ethers5Adapter = new Ethers5Adapter()

// 3. Create your application's metadata object
// 2. Create your application's metadata object
const metadata = {
name: 'My Website',
description: 'My Website description',
url: 'https://mywebsite.com', // url must match your domain & subdomain
icons: ['https://avatars.mywebsite.com/']
}

// 4. Create a AppKit instance
// 3. Create a AppKit instance
const modal = createAppKit({
adapters: [ethers5Adapter],
adapters: [new Ethers5Adapter()],
metadata: metadata,
networks: [mainnet, arbitrum],
projectId,
Expand Down
2 changes: 1 addition & 1 deletion docs/appkit/javascript/solana/about/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const projectId = 'YOUR_PROJECT_ID'
const metadata = {
name: 'AppKit',
description: 'AppKit Solana Example',
url: 'https://web3modal.com', // origin must match your domain & subdomain
url: 'https://example.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}

Expand Down
2 changes: 1 addition & 1 deletion docs/appkit/javascript/wagmi/about/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const wagmiAdapter = new WagmiAdapter({
const metadata = {
name: 'AppKit',
description: 'AppKit Example',
url: 'https://web3modal.com', // origin must match your domain & subdomain
url: 'https://example.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}

Expand Down
11 changes: 4 additions & 7 deletions docs/appkit/next/ethers/about/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,18 @@ import { mainnet, arbitrum } from '@reown/appkit/networks'
// 1. Get projectId at https://cloud.reown.com
const projectId = 'YOUR_PROJECT_ID'

// 2. Set Ethers adapters
const EthersAdapter = new EthersAdapter()

// 3. Create a metadata object
// 2. Create a metadata object
const metadata = {
name: 'My Website',
description: 'My Website description',
url: 'https://mywebsite.com', // origin must match your domain & subdomain
icons: ['https://avatars.mywebsite.com/']
}

// 4. Create the AppKit instance
// 3. Create the AppKit instance
createAppKit({
adapters: [EthersAdapter],
metadata: metadata,
adapters: [new EthersAdapter()],
metadata,
networks: [mainnet, arbitrum],
projectId,
features: {
Expand Down
9 changes: 3 additions & 6 deletions docs/appkit/next/ethers5/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,17 @@ import { mainnet, arbitrum } from '@reown/appkit/networks'
// 1. Get projectId at https://cloud.reown.com
const projectId = 'YOUR_PROJECT_ID'

// 2. Set Ethers adapters
const ethers5Adapter = new Ethers5Adapter()

// 3. Create a metadata object
// 2. Create a metadata object
const metadata = {
name: 'My Website',
description: 'My Website description',
url: 'https://mywebsite.com', // origin must match your domain & subdomain
icons: ['https://avatars.mywebsite.com/']
}

// 4. Create the AppKit instance
// 3. Create the AppKit instance
createAppKit({
adapters: [ethers5Adapter],
adapters: [new Ethers5Adapter()],
metadata: metadata,
networks: [mainnet, arbitrum],
projectId,
Expand Down
2 changes: 1 addition & 1 deletion docs/appkit/next/solana/about/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const projectId = 'YOUR_PROJECT_ID'
const metadata = {
name: 'AppKit',
description: 'AppKit Solana Example',
url: 'https://web3modal.com', // origin must match your domain & subdomain
url: 'https://example.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}

Expand Down
2 changes: 1 addition & 1 deletion docs/appkit/react/core/custom-connectors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const ethersAdapter = new EthersAdapter()
createAppKit({
adapters: [ethersAdapter],
networks: [sepolia],
metadata: metadata,
metadata,
projectId,
features: {
analytics: true, // Optional - defaults to your Cloud configuration
Expand Down
43 changes: 10 additions & 33 deletions docs/appkit/react/ethers/about/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,14 @@ On top of your app set up the following configuration, making sure that all func

```tsx
import { createAppKit } from '@reown/appkit/react'
import { Ethers5Adapter } from '@reown/appkit-adapters-ethers'
import { EthersAdapter } from '@reown/appkit-adapter-ethers'
import { arbitrum, mainnet } from '@reown/appkit/networks'

// 1. Get projectId
const projectId = 'YOUR_PROJECT_ID'
const projectId = 'YOUR_PROJECT_ID';

// 2. Create a function to fetch the Blockchain API RPC URL
function getBlockchainApiRpcUrl(chainId: number) {
return `https://rpc.walletconnect.org/v1/?chainId=eip155:${chainId}&projectId=${projectId}`
}

// 3. Set the chains
const chains = [
{
chainId: 1,
name: 'Ethereum',
currency: 'ETH',
explorerUrl: 'https://etherscan.io',
rpcUrl: getBlockchainApiRpcUrl(1),
chainNamespace: 'eip155'
},
{
chainId: 42161,
name: 'Arbitrum',
currency: 'ETH',
explorerUrl: 'https://arbiscan.io',
rpcUrl: getBlockchainApiRpcUrl(42161),
chainNamespace: 'eip155'
}
]
// 2. Set the networks
const networks = [arbitrum, mainnet];

// 3. Create a metadata object - optional
const metadata = {
Expand All @@ -43,21 +22,19 @@ const metadata = {
icons: ['https://avatars.mywebsite.com/']
}

// 4. Create Ethers Adapter
const ethersAdapter = new EthersAdapter()

// 5. Create a AppKit instance
// 4. Create a AppKit instance
createAppKit({
adapters: [ethersAdapter],
networks: chains,
adapters: [new ethersAdapter()],
networks,
metadata,
projectId,
features: {
analytics: true // Optional - defaults to your Cloud configuration
}
})

export default function App() {
return <YourApp /> //make sure you have configured the <w3m-button> inside
return <YourApp /> // Configure the <w3m-button> or a similar button inside
}
```

Expand Down
9 changes: 3 additions & 6 deletions docs/appkit/react/ethers5/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,17 @@ import { mainnet, arbitrum } from '@reown/appkit/networks'
// 1. Get projectId
const projectId = 'YOUR_PROJECT_ID'

// 2. Set Ethers adapters
const ethers5Adapter = new Ethers5Adapter()

// 3. Create a metadata object - optional
// 2. Create a metadata object - optional
const metadata = {
name: 'My Website',
description: 'My Website description',
url: 'https://mywebsite.com', // origin must match your domain & subdomain
icons: ['https://avatars.mywebsite.com/']
}

// 4. Create the AppKit instance
// 3. Create the AppKit instance
createAppKit({
adapters: [ethers5Adapter],
adapters: [new Ethers5Adapter()],
metadata: metadata,
networks: [mainnet, arbitrum],
projectId,
Expand Down
2 changes: 1 addition & 1 deletion docs/appkit/react/solana/about/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const projectId = 'YOUR_PROJECT_ID'
const metadata = {
name: 'AppKit',
description: 'AppKit Solana Example',
url: 'https://web3modal.com', // origin must match your domain & subdomain
url: 'https://example.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}

Expand Down
21 changes: 11 additions & 10 deletions docs/appkit/react/wagmi/about/implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,26 @@ const projectId = 'YOUR_PROJECT_ID'
const metadata = {
name: 'AppKit',
description: 'AppKit Example',
url: 'https://web3modal.com', // origin must match your domain & subdomain
url: 'https://example.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}
};

export const networks = [mainnet, arbitrum]
// 3. Set the networks
const networks = [mainnet, arbitrum]

// 3. Create Wagmi Adapter
// 4. Create Wagmi Adapter
const wagmiAdapter = new WagmiAdapter({
ssr: true,
networks,
projectId
})
projectId,
ssr: true
});

// 4. Create modal
// 5. Create modal
createAppKit({
adapters: [wagmiAdapter],
networks: [mainnet, arbitrum],
metadata,
networks,
projectId,
metadata,
features: {
analytics: true // Optional - defaults to your Cloud configuration
}
Expand Down
12 changes: 6 additions & 6 deletions docs/appkit/shared/multichain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const solanaWeb3JsAdapter = new SolanaAdapter({
const metadata = {
name: 'AppKit',
description: 'AppKit Example',
url: 'https://web3modal.com', // origin must match your domain & subdomain
url: 'https://example.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}

Expand Down Expand Up @@ -125,15 +125,15 @@ const projectId = 'YOUR_PROJECT_ID'
const metadata = {
name: 'AppKit',
description: 'AppKit Example',
url: 'https://web3modal.com', // origin must match your domain & subdomain
url: 'https://example.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}

// 4. Create the AppKit instance
const modal = createAppKit({
adapters: [ethersAdapter, solanaWeb3JsAdapter],
networks: [mainnet, arbitrum, sepolia, solana, solanaTestnet, solanaDevnet],
metadata: metadata,
metadata,
projectId,
features: {
analytics: true,
Expand Down Expand Up @@ -168,15 +168,15 @@ const projectId = 'YOUR_PROJECT_ID'
const metadata = {
name: 'AppKit',
description: 'AppKit Example',
url: 'https://web3modal.com', // origin must match your domain & subdomain
url: 'https://example.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}

// 4. Create the AppKit instance
const modal = createAppKit({
adapters: [ethersAdapter, solanaWeb3JsAdapter],
networks: [mainnet, arbitrum, sepolia, solana, solanaTestnet, solanaDevnet],
metadata: metadata,
metadata,
projectId,
features: {
analytics: true,
Expand All @@ -198,7 +198,7 @@ const projectId = 'YOUR_PROJECT_ID'
const metadata = {
name: 'AppKit',
description: 'AppKit Example',
url: 'https://web3modal.com', // origin must match your domain & subdomain
url: 'https://example.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}

Expand Down
8 changes: 4 additions & 4 deletions docs/appkit/upgrade/appkitv2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const projectId = 'YOUR_PROJECT_ID'
+ const metadata = {
+ name: 'AppKit',
+ description: 'AppKit Example',
+ url: 'https://web3modal.com',
+ url: 'https://example.com',
+ icons: ['https://avatars.githubusercontent.com/u/179229932']
+ }

Expand Down Expand Up @@ -184,7 +184,7 @@ const projectId = 'YOUR_PROJECT_ID'
+ const metadata = {
+ name: 'AppKit',
+ description: 'AppKit Example',
+ url: 'https://web3modal.com', // origin must match your domain & subdomain
+ url: 'https://example.com', // origin must match your domain & subdomain
+ icons: ['https://avatars.githubusercontent.com/u/179229932']
+ }

Expand Down Expand Up @@ -289,7 +289,7 @@ const projectId = 'YOUR_PROJECT_ID'
+ const metadata = {
+ name: 'AppKit',
+ description: 'AppKit Example',
+ url: 'https://web3modal.com',
+ url: 'https://example.com',
+ icons: ['https://avatars.githubusercontent.com/u/179229932']
+ }
+ const wagmiConfig = defaultWagmiConfig({ chains, projectId, appName: metadata.name })
Expand Down Expand Up @@ -359,7 +359,7 @@ const projectId = 'YOUR_PROJECT_ID'
+ const metadata = {
+ name: 'AppKit',
+ description: 'AppKit Example',
+ url: 'https://web3modal.com',
+ url: 'https://example.com',
+ icons: ['https://avatars.githubusercontent.com/u/179229932']
+ }
/* highlight-add-end */
Expand Down
4 changes: 2 additions & 2 deletions docs/appkit/upgrade/to-reown-appkit-web.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const queryClient = new QueryClient()
const metadata = { //optional
name: 'AppKit',
description: 'AppKit Example',
url: 'https://web3modal.com',
url: 'https://example.com',
icons: ['https://avatars.githubusercontent.com/u/179229932']
}

Expand Down Expand Up @@ -182,7 +182,7 @@ const queryClient = new QueryClient()
const metadata = { //optional
name: 'AppKit',
description: 'AppKit Example',
url: 'https://web3modal.com',
url: 'https://example.com',
icons: ['https://avatars.githubusercontent.com/u/179229932']
}

Expand Down
Loading

0 comments on commit b4e72e2

Please sign in to comment.