Swapping Matic is actually requesting swap for wrapped Matic
@JFrankfurt is already working on this.
Since May 6, 2022.
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Bug Description
Connected through Metamask. Polygon Network is connected. When I select MATIC it shows the correct balance for MATIC native token. Doing a swap to USDC however sends a swap for WMATIC to USDC which can also bee seen when looking in the router. It can further be seen in the transaction data. When already approved for WMATIC its working but in my case it was not so the transaction obviously failed. Native Matic has address '0x0000000000000000000000000000000000001010' but '0d500b1d8e8ef31e21c99d1db9a6444d3adf127' is used which is the contract for wrapped MATIC (which can be selected seperatly and does work correctly).
Steps to Reproduce
- Select Polygon network
- Connect Metamask
- Select MATIC as first token
- Select USDC as token to swap to
- Press Swap
Expected Behavior
It should initiate a swap with native MATIC token
Additional Context
Here is the transaction data where you can see that it wants to swap from '0d500b1d8e8ef31e21c99d1db9a6444d3adf127' which is WMATIC and not nativ MATIC (copied from Metamask)
0x5ae401dc000000000000000000000000000000000000000000000000000000006275164300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e404e45aaf0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12700000000000000000000000002791bca1f2de4661ed88a30c99a7a9449aa8417400000000000000000000000000000000000000000000000000000000000001f40000000000000000000000006d0e2bca9096de4356a308064b511f4ec6459b250000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000fbed4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.