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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1c69d38
move the gas estimation stuff into its own hook and report errors fro…
moodysalem Jul 30, 2020
b997e65
fix linter errors
moodysalem Jul 30, 2020
a5098a6
show the swap callback error separately
moodysalem Jul 30, 2020
dbb28b5
rename some variables
moodysalem Jul 30, 2020
b05e07b
use a manually specified key for gas estimates
moodysalem Jul 30, 2020
3e707e9
Merge branch 'master' into better-swap-errors
moodysalem Jul 30, 2020
646c44a
Merge branch 'master' into better-swap-errors
moodysalem Jul 31, 2020
e818962
flip price... thought i did this already
moodysalem Jul 31, 2020
532f2d7
only show swap callback error if approval state is approved
moodysalem Jul 31, 2020
504f10c
some clean up to the swap components
moodysalem Jul 31, 2020
9934e87
stop proactively looking for gas estimates
moodysalem Aug 3, 2020
b67d5aa
improve some retry stuff, show errors inline
moodysalem Aug 3, 2020
7d83a2e
add another retry test
moodysalem Aug 3, 2020
f7ce0f1
latest ethers
moodysalem Aug 3, 2020
f84aa07
fix integration tests
moodysalem Aug 4, 2020
e798d82
simplify modal and fix jitter on open in mobile
moodysalem Aug 4, 2020
69a2cee
refactor confirmation modal into pieces before creating the error con…
moodysalem Aug 4, 2020
a024e92
finish refactoring of transaction confirmation modal
moodysalem Aug 4, 2020
368c782
show error state in the transaction confirmation modal
moodysalem Aug 4, 2020
1c5ba1d
fix lint errors
moodysalem Aug 4, 2020
74b6639
error not always relevant
moodysalem Aug 4, 2020
69e6f17
fix lint errors, remove action item
moodysalem Aug 4, 2020
a3ebbb1
move a lot of code into ConfirmSwapModal.tsx
moodysalem Aug 4, 2020
00d2bf6
show accept changes flow, not styled
moodysalem Aug 4, 2020
dc2b6f9
Adjust styles for slippage error states
callil Aug 5, 2020
9d47801
Add styles for updated price prompt
callil Aug 5, 2020
b368a62
Add input/output highlighting
callil Aug 5, 2020
2aa81ca
lint errors
moodysalem Aug 5, 2020
dc02608
fix link to wallets in modal
moodysalem Aug 5, 2020
0946891
use total supply instead of reserves for `noLiquidity` (fixes #701)
moodysalem Aug 5, 2020
120c766
bump the walletconnect version to the fixed alpha
moodysalem Aug 6, 2020
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
20 changes: 6 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,7 @@
"homepage": ".",
"private": true,
"devDependencies": {
"@ethersproject/address": "5.0.0-beta.134",
"@ethersproject/bignumber": "5.0.0-beta.138",
"@ethersproject/constants": "5.0.0-beta.133",
"@ethersproject/contracts": "5.0.0-beta.151",
"@ethersproject/experimental": "5.0.0-beta.141",
"@ethersproject/networks": "5.0.0-beta.136",
"@ethersproject/providers": "5.0.0-beta.162",
"@ethersproject/solidity": "5.0.2",
"@ethersproject/strings": "5.0.0-beta.136",
"@ethersproject/units": "5.0.0-beta.132",
"@ethersproject/wallet": "5.0.0-beta.141",
"@ethersproject/experimental": "^5.0.1",
"@popperjs/core": "^2.4.4",
"@reach/dialog": "^0.10.3",
"@reach/portal": "^0.10.3",
Expand Down Expand Up @@ -52,6 +42,7 @@
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^4.0.0",
"ethers": "^5.0.7",
"i18next": "^15.0.9",
"i18next-browser-languagedetector": "^3.0.1",
"i18next-xhr-backend": "^2.0.1",
Expand All @@ -60,7 +51,6 @@
"lodash.flatmap": "^4.5.0",
"polished": "^3.3.2",
"prettier": "^1.17.0",
"qrcode.react": "^0.9.3",
"qs": "^6.9.4",
"react": "^16.13.1",
"react-device-detect": "^1.6.2",
Expand All @@ -80,8 +70,10 @@
"serve": "^11.3.0",
"start-server-and-test": "^1.11.0",
"styled-components": "^4.2.0",
"typescript": "^3.8.3",
"use-media": "^1.4.0"
"typescript": "^3.8.3"
},
"resolutions": {
"@walletconnect/web3-provider": "1.1.1-alpha.0"
},
"scripts": {
"start": "react-scripts start",
Expand Down
9 changes: 4 additions & 5 deletions src/components/AccountDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,26 +251,26 @@ export default function AccountDetails({
} else if (connector === walletconnect) {
return (
<IconWrapper size={16}>
<img src={WalletConnectIcon} alt={''} />
<img src={WalletConnectIcon} alt={'wallet connect logo'} />
</IconWrapper>
)
} else if (connector === walletlink) {
return (
<IconWrapper size={16}>
<img src={CoinbaseWalletIcon} alt={''} />
<img src={CoinbaseWalletIcon} alt={'coinbase wallet logo'} />
</IconWrapper>
)
} else if (connector === fortmatic) {
return (
<IconWrapper size={16}>
<img src={FortmaticIcon} alt={''} />
<img src={FortmaticIcon} alt={'fortmatic logo'} />
</IconWrapper>
)
} else if (connector === portis) {
return (
<>
<IconWrapper size={16}>
<img src={PortisIcon} alt={''} />
<img src={PortisIcon} alt={'portis logo'} />
<MainWalletAction
onClick={() => {
portis.portis.showPortis()
Expand Down Expand Up @@ -382,7 +382,6 @@ export default function AccountDetails({
</AccountControl>
</>
)}
{/* {formatConnectorName()} */}
</AccountGroupingRow>
</InfoCard>
</YourAccount>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const Base = styled(RebassButton)<{
flex-wrap: nowrap;
align-items: center;
cursor: pointer;
position: relative;
z-index: 1;
&:disabled {
cursor: auto;
}
Expand Down
133 changes: 0 additions & 133 deletions src/components/ConfirmationModal/index.tsx

This file was deleted.

Loading