Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/sdk/swap-widget/guides/swap-widget.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function App() {
}
```

That’s it! You should now see a fully functional swap widget on your site. The widget is self-contained and gracefully handles all interactions with the Uniswap Protocol. It leverages the [Auto Router](/sdk/v3/guides/routing) to compute the best price across all Uniswap v2 and v3 pools.
That’s it! You should now see a fully functional swap widget on your site. The widget is self-contained and gracefully handles all interactions with the Uniswap Protocol. It leverages the [Auto Router](/sdk/v3/guides/swaps/routing) to compute the best price across all Uniswap v2 and v3 pools.

See a full implementation of the swap widget in the `/cra` and `/nextjs` branches of the [widgets-demo](https://github.com/Uniswap/widgets-demo) repo.

Expand Down Expand Up @@ -101,7 +101,7 @@ import { provider } from './your/provider'

// We recommend you pass your own JSON-RPC endpoints.
const jsonRpcUrlMap = {
1: ['https://mainnet.infura.io/v3/<YOUR_INFURA_PROJECT_ID>'],
1: ['https://mainnet.infura.io/v3/<YOUR_INFURA_PROJECT_ID>'],
3: ['https://ropsten.infura.io/v3/<YOUR_INFURA_PROJECT_ID>']
}

Expand All @@ -116,7 +116,7 @@ function App() {

JSON-RPC endpoints are used to read data when no `provider` is connected. We strongly recommend you pass either a Web3 Provider to the `provider` prop, or JSON-RPC endpoint URLs to the `jsonRpcUrlMap` prop.

The widget will use these endpoints to fetch on-chain data and submit transactions for signature. If the user connects a MetaMask wallet, the widget will use the JSON-RPC provided by MetaMask when possible. [(See a list of all chains supported on widget.)](https://github.com/Uniswap/widgets/blob/main/src/constants/chains.ts#L4)
The widget will use these endpoints to fetch on-chain data and submit transactions for signature. If the user connects a MetaMask wallet, the widget will use the JSON-RPC provided by MetaMask when possible. [(See a list of all chains supported on widget.)](https://github.com/Uniswap/widgets/blob/main/src/constants/chains.ts#L4)

If you don’t yet have JSON-RPC endpoints, you can easily create them with services like [Chainnodes](https://www.chainnodes.org), [Infura](https://infura.io/product/ethereum) or [Alchemy](https://www.alchemy.com/supernode).

Expand Down
6 changes: 3 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,15 @@ module.exports = {
from: '/sdk/v3/guides/quick-start',
},
{
to: '/sdk/v3/guides/quoting',
to: '/sdk/v3/guides/swaps/quoting',
from: ['/sdk/v3/guides/creating-a-pool', '/sdk/v3/guides/fetching-prices'],
},
{
to: '/sdk/v3/guides/trading',
to: '/sdk/v3/guides/swaps/trading',
from: '/sdk/v3/guides/creating-a-trade',
},
{
to: '/sdk/v3/guides/routing',
to: '/sdk/v3/guides/swaps/routing',
from: '/sdk/v3/guides/auto-router',
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ export const dAppGuides = [
{
title: 'Create a Trade',
text: 'Fetch a Quote for a Trade and execute the Trade',
to: '/sdk/v3/guides/trading',
to: '/sdk/v3/guides/swaps/trading',
},
{
title: 'Route trades',
text: 'Use Routing to get optimized prices for your Trades',
to: '/sdk/v3/guides/routing',
to: '/sdk/v3/guides/swaps/routing',
},
{
title: 'Provide liquidity',
Expand Down