Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement(swap): Better swap errors for FoT #1015

Merged
merged 31 commits into from
Aug 6, 2020
Merged

Conversation

moodysalem
Copy link
Contributor

@moodysalem moodysalem commented Jul 30, 2020

fixes #820
fixes #988
fixes #871 for swaps (create new issue for add/remove liquidity)
fixes #701

@vercel
Copy link

vercel bot commented Jul 30, 2020

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/uniswap-interface/7mnzvx734
✅ Preview: https://uniswap-interface-git-better-swap-errors.uniswap.vercel.app

resolve: (result: any) => void
reject: (error: Error) => void
}

class MiniRpcProvider implements AsyncSendable {
Copy link
Contributor Author

@moodysalem moodysalem Jul 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

batches eth_estimateGas, eth_call and potentially eth_blockNumber though that is usually sequential with the other two

swapMethods.push(
Router.swapCallParameters(trade, {
feeOnTransfer: false,
feeOnTransfer: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this diff came out real funny

@moodysalem moodysalem requested a review from ianlapham July 30, 2020 23:44
@vercel vercel bot temporarily deployed to Preview August 4, 2020 20:17 Inactive
@moodysalem moodysalem merged commit 0f91af1 into master Aug 6, 2020
@moodysalem moodysalem deleted the better-swap-errors branch August 6, 2020 23:18
crisog pushed a commit to Levinswap/levinswap-interface that referenced this pull request Feb 5, 2021
* move the gas estimation stuff into its own hook and report errors from the gas estimation

* fix linter errors

* show the swap callback error separately

* rename some variables

* use a manually specified key for gas estimates

* flip price... thought i did this already

* only show swap callback error if approval state is approved

* some clean up to the swap components

* stop proactively looking for gas estimates

* improve some retry stuff, show errors inline

* add another retry test

* latest ethers

* fix integration tests

* simplify modal and fix jitter on open in mobile

* refactor confirmation modal into pieces before creating the error content

* finish refactoring of transaction confirmation modal

* show error state in the transaction confirmation modal

* fix lint errors

* error not always relevant

* fix lint errors, remove action item

* move a lot of code into ConfirmSwapModal.tsx

* show accept changes flow, not styled

* Adjust styles for slippage error states

* Add styles for updated price prompt

* Add input/output highlighting

* lint errors

* fix link to wallets in modal

* use total supply instead of reserves for `noLiquidity` (fixes Uniswap#701)

* bump the walletconnect version to the fixed alpha

Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
daniel-dev1990 pushed a commit to daniel-dev1990/uniswap-interface that referenced this pull request Jul 8, 2021
* move the gas estimation stuff into its own hook and report errors from the gas estimation

* fix linter errors

* show the swap callback error separately

* rename some variables

* use a manually specified key for gas estimates

* flip price... thought i did this already

* only show swap callback error if approval state is approved

* some clean up to the swap components

* stop proactively looking for gas estimates

* improve some retry stuff, show errors inline

* add another retry test

* latest ethers

* fix integration tests

* simplify modal and fix jitter on open in mobile

* refactor confirmation modal into pieces before creating the error content

* finish refactoring of transaction confirmation modal

* show error state in the transaction confirmation modal

* fix lint errors

* error not always relevant

* fix lint errors, remove action item

* move a lot of code into ConfirmSwapModal.tsx

* show accept changes flow, not styled

* Adjust styles for slippage error states

* Add styles for updated price prompt

* Add input/output highlighting

* lint errors

* fix link to wallets in modal

* use total supply instead of reserves for `noLiquidity` (fixes Uniswap#701)

* bump the walletconnect version to the fixed alpha

Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants