docs icon indicating copy to clipboard operation
docs copied to clipboard

Update 06-auto-router.md

Open webcaetano opened this issue 3 years ago • 2 comments

This fix a code bug, because ChainId were never called

Also the code just above

const WETH = new Token(
  1,
  '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
  18,
  'WETH',
  'Wrapped Ether'
);

Is also like this

webcaetano avatar Jan 30 '22 00:01 webcaetano

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/uniswap/docs/BYcZ4rVLgQm67dCtjfL1KFK9i5nL
✅ Preview: https://docs-git-fork-webcaetano-webcaetano-small-patch-fix-uniswap.vercel.app

vercel[bot] avatar Jan 30 '22 00:01 vercel[bot]

We could import ChainId by changing this line:

import { AlphaRouter } from '@uniswap/smart-order-router'

into:

import { AlphaRouter, ChainId } from '@uniswap/smart-order-router'

And then probably it's better to use ChainId.MAINNET for WETH token.

pjona avatar Feb 10 '22 15:02 pjona

Closing in favor of #420

adjkant avatar Nov 29 '22 18:11 adjkant