Commit Graph

145 Commits

Author SHA1 Message Date
vignesh mohankumar
bf13b4a917
chore: remove redesign flag in swap (#4964) 2022-10-19 17:42:34 -04:00
vignesh mohankumar
cba30fb0b1
chore: remove navBarFlag (#4941)
* chore: remove navBarFlag

* move Polling
2022-10-17 16:44:11 -04:00
lynn
a5c5567936
feat: widget analytics (#4869)
* chore: todos for analytics

* example

* another skeleton logging event

* feat: onSwapApprove

* feat: widget tracing

* feat: better useTrace

* feat: max

* feat: switch

* add trace amd remove onreviewswapclick

* onExpandSwapDetails

* feat: initial quote

* add event properties for wrap

* feat: update ack

* SWAP_SIGNED

* feat: submit

* fix: wrap type

* chore: tracing

* move format fn to utils

* fix: remove old background-color flash (#4890)

remove old background-color

* revert: add back phase0 bug fixes (#4888)

* Revert "revert: removing phase0 bug fixes temporarily (#4886)"

This reverts commit 06291a15a6af77b8493e14e2cb2c84cea5c10709.

* use token amount

* Revert "use token amount"

This reverts commit f47c00358b29cfa9886bf4e490df4bf70b88e648.

* dont render if empty

* fix: upgrade pkg to eliminate compile error (#4898)

* upgrade pkg

* dedup

* fix: Remove token selector flash of old ui  (#4896)

remove token selector flash of old view

* fix: Web 1561 logging event for clicking on explore banner toast +  WEB-1543  [Explore Banner] String should be sentence case (#4899)

* explore banner changes

* remove console log

* oops

* test: run tests on all PRs (#4905)

* fix: use correct optimism icon in explore (#4893)

* fix: click area should match button effect (#4887)

* fix: update font-weight values to match spec (#4863)

* fixes. working now verified on console.

* fix: mobile tweaks (#4910)

* update manifest theme colors to magenta

* text spacing and right positioning on very small screens

* feat: load token from query data (#4904)

* fix: do not fetch balances cross-chain

* build: updgrade widget

* feat: cleanly load and switch chains from widget

* fix: load token from query data

* build: trigger checks

* fix: do not override native token from query

* fix: catch error on switch chain

* refactor: useTokenFromActiveNetwork

* refactor: defaultToken behavior clarification

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
Co-authored-by: vignesh mohankumar <vignesh@vigneshmohankumar.com>
Co-authored-by: cartcrom <39385577+cartcrom@users.noreply.github.com>
2022-10-13 12:20:59 -04:00
lynn
87a6e2709b
fix: remove double $ render (#4864)
remove double $ render
2022-10-11 13:43:11 -04:00
lynn
a663482dc6
fix: second part of price fixes (#4852)
* init

* use named args

* transaction price format

* respond to comments

* 1.00 rounding edge case
2022-10-10 22:09:02 -04:00
vignesh mohankumar
995a62985e
fix: allows SwapDetailsDropdown to be opened (#4794) 2022-10-04 17:46:21 -04:00
vignesh mohankumar
a73e814167
fix: swap hover states (#4771)
* Swap component tweaks

* Fix spacing issues and update swap arrows icon

* px

* fix ternaries

* 20px

* create a separate OutputWrapper

* variable

* update border radius case

* fix type

* use right variable

* move the containers around

* rename to swap section

* swapdetailssection

* remove unnecessary autocolumn

* border radius

* remove unnecessary wrapping div

* wrap the output swap stuff

* inherit border-radius

* update overlay styles

* remove floating bg

* fix ungated version

* fix background colors

* trying this out

* separate blocks

* accent action on the buttons

* undo

* show unselected state properly

* show on expert mode

* 0 not none

* handle margintop

* flag font size

* undo reverse icon change

* fix build

Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2022-10-04 14:10:42 -04:00
vignesh mohankumar
1601962f03
fix: use font-feature-settings in AppWrapper (#4759)
* font-feature-settings

* fix: use font-feature-settings across app

* move to appwrapper

* oops

* maybe better?

* fix
2022-09-28 18:14:00 -04:00
vignesh mohankumar
077437e1f1
fix: update swap box styles (#4687)
* fix: update swap box styles

* fix balance text color/weight

* fix padding

* text color
2022-09-28 12:29:58 -04:00
vignesh mohankumar
7a9d2e80d0
refactor: move components/AmplitudeAnalytics to analytics (#4655)
* move components/AmplitudeAnalytics to analytics/amplitude

* move to analytics

* fix imports
2022-09-19 12:54:54 -04:00
lynn
b90d6b5ab0
feat: amplitude swap fixes (#4627)
* init

* add back txn completed event
2022-09-15 17:53:45 -04:00
Connor McEwen
9d3249e6bd
fix: rendering issues with modal/header (#4636)
* fix overlay issue with modal

* fix z index
2022-09-15 15:32:06 -04:00
lynn
4d4462368b
fix: add back usd volume to swap submitted from ui instead of infura hook (#4563)
* init

* typo
2022-09-02 14:56:05 -04:00
lynn
b82b9acc54
fix: remove stablecoin usd val fetch in logging to reduce infura spend (#4543)
remove stablecoin usd val fetch reduce infura
2022-08-30 15:15:49 -04:00
Zach Pomerantz
723db9d0ea
feat: integrate widget settings/value (#4499)
* widgets: v2.2.0

* refactor: wrap Widget

* feat: integrate widget settings

* refactor: import from widgets

* fix: better settings integration

* fix: include types

* chore: formatting

* build: bump widgets version

* feat: integrate widget value

* feat: integrate widget token selection

* feat: clean up widget integration

* build: bump widgets version

* refactor: mv widget wrapper to components

* refactor: split widget integrations

* refactor: value -> inputs

* fix: consolidate slippage hooks

* fix: memoize currency search modal

* refactor: clarify widget code

* fix: allow loading token in widget

* fix: add TradeType helpers
2022-08-26 11:19:51 -07:00
lynn
eb4f90e669
feat: add volume trade info to swap completed event (#4506)
add volume trade info to swap completed event
2022-08-26 10:56:53 -04:00
Jack Short
aa426514f3
chore: updating navbar padding for token pages (#4474)
* chore: updating navbar padding for token pages

* removing margin on pools page
2022-08-25 11:20:19 -04:00
Jack Short
c43c8de6cd
chore: updating breakpoints (#4465)
* chore: updating breakpoints

* deprecating old breakpoints

* using breakpoints in theme instead of media queries
2022-08-24 13:43:46 -04:00
Vignesh Mohankumar
69cdefe996
fix: update Swap container padding (#4440)
* fix: update Swap container padding

* rm AlertWrapper

* empty
2022-08-22 17:28:17 -04:00
Zach Pomerantz
9f108c406b
chore: clean up theme usage (#4335)
* chore: clean up DefaultTheme usage

* chore: simplify useTheme usage

* chore: consolidate multi-line imports
2022-08-17 16:55:58 +00:00
Vignesh Mohankumar
1a7b86d155
chore: remove unused exports (#4380) 2022-08-17 11:45:45 -04:00
Vignesh Mohankumar
c5b67ac60b
refactor: deprecate theme.none (#4362) 2022-08-16 09:05:43 -07:00
Vignesh Mohankumar
09380698fa
refactor: split phase0 flag into redesign, explore, tokenSafety (#4347)
* changes so far

* more changes

* lint

* remove Phase0:
2022-08-15 10:09:26 -04:00
Kaylee George
f570c3fa06
fix: update time option menu for token details and colors to match theme file (#4322)
* fix time options and colors

* fix line height

* color change
2022-08-11 19:35:34 +00:00
Callil Capuozzo
4b5246394b
feat: update Swap styles, update theme colors (#4294)
* toggle

* fixed position

* im bad at spelling

* rm button

* fix

* initial

* fix

* styles

* iteration

* minor updates

* additions

* updates

* rm file

* color update

* updates

* start feature flag

* more flagging

* FLAGZ

* even more flagging

* flagbergasted

* more

* minor updates

* updates

* lets go

* merge

* merge fix

* merge fixes

* theme

* Merge remote-tracking branch 'origin/kg/explore-colorChanges2' into swap_and_colors

* Fix merge conflicts

* themeUpdates

* Update colors based on Phil's latest

* Add new default gradients

* toggle

* fixed position

* im bad at spelling

* rm button

* initial

* fix

* styles

* iteration

* minor updates

* additions

* updates

* rm file

* color update

* updates

* start feature flag

* more flagging

* FLAGZ

* even more flagging

* flagbergasted

* more

* minor updates

* updates

* lets go

* Merge remote-tracking branch 'origin/kg/explore-colorChanges2' into swap_and_colors

* merge

* Fix merge conflicts

* merge fixes

* theme

* themeUpdates

* Update colors based on Phil's latest

* Add new default gradients

* update swap index

* fix merge bugs

* Tweak swap

* update from main

* Fix merge issues and color bug

* Update index.test.tsx.snap

* Remove un-used constants

* updates

* font

* add space

* style

* style

* style

* hover state

* color fixes

* meh

* Update index.tsx

* fix conflict

Co-authored-by: Kaylee George <62825936+kayleegeorge@users.noreply.github.com>
2022-08-10 19:03:30 +00:00
lynn
1d21eebcd3
feat: Web 714 additional swap submitted event properties (block number, route properties) (#4305)
* init commit

* remove absolute value in date calc

* all the events are now logged properly plus changed native token address to NATIVE

* add documentation line

* remove unnecessary prop

* init

* add approve token event

* fix build

* add route event properties

* fix build

* respond to vm comments

* respond to vm comments

* temp

* init

* add blockNumber

* remove console logs
2022-08-09 10:57:35 -04:00
Connor McEwen
184a1419ed
feat: fetch stablecoin price with SOR, PI warning (#4217)
* feat: fetch stablecoins price with SOR, PI warning

* calculate realized price impact

* remove unrelated changes

* dupe import

* pr feedback

* use the same calculation function for PI

* use proper var
2022-07-29 15:40:04 -04:00
lynn
6cb6faa92b
feat: add time / duration based event properties to swap events (#4193)
* init commit

* remove absolute value in date calc

* all the events are now logged properly plus changed native token address to NATIVE

* add documentation line

* remove unnecessary prop

* respond to vm comments

* merge and rename util method

* respond to vm comments again
2022-07-28 19:35:18 +00:00
lynn
3c5cc21ed5
feat: remaining swap events (#4169)
* init commit

* add amplitude ts sdk to package.json

* add more comments and documentation

* respond to vm comments

* respond to cmcewen comments

* fix: remove unused constants

* init commit

* adapt to web

* add optional event properties to trace

* correct telemetry to analytics

* init commit

* change telemetry to analytics in doc

* init commit

* fix: respond to cmcewen comments + initialize analytics in app.tsx + add missing return statement

* add element name constant

* init commit

* correct price_impact calculation

* resolve vm comments

* fixes in response to comments

* respond to vm

* use ALL significant digits for token amounts

* init commit

* logged all properties

* create helper function getPriceImpactPercentageNumber

* 4 decimal points for percentages

* price percentage fn

* only log event on FIRST price fetch

* init commit

* add swap transaction completed event

* respond to cmcewen comments

* add two events

* remove console.logs

* move transaction completed logging to reducer

* simplify and remove unnecessary logic and constants

* respond to cmcewen comments

* respond to cmcewen comments

* respond to vm comment
2022-07-28 19:05:55 +00:00
Daniel James
352e016621
style: Add Deprecated prefix to ThemedText components (#4192)
* Add Deprecated prefix to ThemedText components

* Fix lint errors
2022-07-26 17:14:43 -04:00
lynn
62550a4a1f
feat: implement swap quote received event (#4165)
* init commit

* add amplitude ts sdk to package.json

* add more comments and documentation

* respond to vm comments

* respond to cmcewen comments

* fix: remove unused constants

* init commit

* adapt to web

* add optional event properties to trace

* correct telemetry to analytics

* init commit

* change telemetry to analytics in doc

* init commit

* fix: respond to cmcewen comments + initialize analytics in app.tsx + add missing return statement

* add element name constant

* init commit

* correct price_impact calculation

* resolve vm comments

* fixes in response to comments

* respond to vm

* use ALL significant digits for token amounts

* init commit

* logged all properties

* create helper function getPriceImpactPercentageNumber

* 4 decimal points for percentages

* price percentage fn

* only log event on FIRST price fetch

* respond to cmcewen comments
2022-07-22 15:50:49 -04:00
lynn
e01f30c0b4
feat: Web 214 implement the main submit swap event (#4061)
* init commit

* add amplitude ts sdk to package.json

* add more comments and documentation

* respond to vm comments

* respond to cmcewen comments

* fix: remove unused constants

* init commit

* adapt to web

* add optional event properties to trace

* correct telemetry to analytics

* init commit

* change telemetry to analytics in doc

* init commit

* fix: respond to cmcewen comments + initialize analytics in app.tsx + add missing return statement

* add element name constant

* init commit

* correct price_impact calculation

* resolve vm comments

* fixes in response to comments

* respond to vm

* use ALL significant digits for token amounts

* create helper function getPriceImpactPercentageNumber

* 4 decimal points for percentages

* change percentage to basis points units
2022-07-21 17:44:34 -04:00
lynn
e06142e26b
feat: implement other swap events part 1 (#4151)
* init commit

* fix prettier errors

* check node env in vercel

* add shouldLogImpression to TraceEvent
2022-07-21 12:09:33 -04:00
Daniel James
d5e4e21a79
style: Adds "deprecated_" prefix to all non-theme colors (#4146)
* Add deprecated_ label to white and black

* Add deprecated_ label to text1 through text5

* Add deprecated_ label for bg0 through bg6

* Add deprecated_ prefix to remaining colors

* Add deprecated_ prefix to direct style references

* Add deprecated_ prefix to all remaining colors

* Update link color

* Fix 'deprecated_white' -> theme.deprecated_white

* Update snapshots
2022-07-20 16:18:38 -04:00
Jesse
e9ef3193ab
refactor: remaining changes from the large celo merge (#4088)
* refactor: useUSDCValue -> useStablecoinValue

* refactor: use the isCelo() helper

* refactor: remove unneeded white space
2022-07-15 10:36:19 -04:00
Jesse
eb06aef199
feat: add support for Celo (#3915)
* feat: Support for Celo

* fix: wrong condition

* combine celo and alfajores lists

* use celo erc20 representation

* fix: refactor infura.ts to networks.ts & add celo to rpc urls

* feature: add celo contract addresses
fix: remove celo from supported gas estimate chains until feature is available

* refactor: useUSDCPrice to useStablecoinPrice
fix: add celo to supported gas estimate chains

* fix: use unique factory address for getting pool address

* fix: darkmode background graident

* fix: removing a comment left behind

* fix: remove bad import

* fix: remove dead link until the Celo is live on info.uniswap.org

* fix: add asset to common bases & minor refactoring

* fix: celo info links point to root info.uniswap.org

* fix: change celo token bridge to portal

* fix: update redux-multicall to latest version

* refactor: for code readability

* fix: celo banner colors & remove unused alternative logo

* fix: change celo token list to hosted version

* fix: update celo banner colors

* fix: move celo to the bottom of the network selector list

* fix: dedup dependencies @uniswap/router-sdk @uniswap/v3-sdk

* fix: refactoring + move Celo above L2s

* fix: update celo contract addresses

* fix: update celo subgraph

* fix: update v3-sdk and smart-order-router versions

* fix: move Celo to the bottom of the network selector list

* fix: downgrade smart-order-router and add casting fix

* fix: downgrade smart-order-router and add casting fix

* fix: resolve Pool dependency

* fix: bridge chain id types

* fix: explorer link test

* fix: use quoter v2 ABI in useClientSideV3Trade fro Celo

* fix: update connection "infura_rpc" to networks

* fix: revert yarn.lock and force install

* fix: dedup router and v3 sdk

* refactor: mv quoter v2 to client side v3 trade

* build: dedup lockfile

* feature: add portal ether to common bases

* fix: add comment for chains that use QuoterV2

* fix: use token as native asset

* fix: supply correct factory address to getPoolAddress call & refactor nativeOnChain method

* feature: adjust celo tokens presetned

* fix: update celo explorer to celoscan

* fix: celo token casting

* fix: celo celo explorer it

* fix: celo chain info should be consistent with block explorer used.

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2022-07-12 16:48:03 +02:00
Anas Yousef
535e670c63
refactor: remove hideRouteDiagram prop (#3763) 2022-07-11 20:30:16 -04:00
Vignesh Mohankumar
322cdaf888
refactor: rm useActiveWeb3React (#4004)
* rm activeweb3react

* wrap in web3provider?
2022-06-30 16:38:02 -07:00
Lynn
b17a38d94b
feat: abstract analytics logging (#3892)
* fix: init commit

* fix: replace ReactGA.event with GoogleAnalyticsProvider.sentEvent

* fix: use GoogleAnalyticsProvider for all other ReactGA usages

* fix: add missing GoogleAnalyticsProvider import

* fix: incorporate zzmp's suggestions

* fix: add import I forgot

* fix: add another import I forgot

* fix: respond to zzmp comments

Co-authored-by: Lynn Yu <lynn.yu@uniswap.org>
2022-06-10 16:36:44 -04:00
Tott0
251339a9ef
feat: changes usdcPrice formatting to fixed decimals (#3849)
* change usdcPrice in swap modal to use fixed decimals instead of significant formatting

* change text for fiatValue as well

* change decimal points condition to 1.05

* (m) missed one value
2022-05-23 13:47:18 -05:00
Zach Pomerantz
61d1036d28
chore: rm widget code (#3810)
* chore: rm widget tooling

* chore: rm widget components

* chore: rm widget theme

* chore: rm widget assets

* chore: rm widget business logic

* chore: rm widget meta

* chore: update yarn.lock

* chore: mv type to usage
2022-05-10 13:49:04 -07:00
0xlucius
9318c1204b
feat: Add on-hover tooltips for tx details (#3178)
* Add on-hover tooltips for tx details

* Change tooltips to use <Trans> macro instead of t

* fix: remove info tooltip on transaction popup

* fix: update getting the nativeCurrencyVariable

* use getNativeCurrency() instead of chainInfo const

Co-authored-by: Christine Legge <christine.legge@uniswap.org>
2022-04-25 12:43:41 -04:00
Connor McEwen
de1f5d1adc
feat: migrate to GA4 (#3599) 2022-03-24 21:44:48 -04:00
Curly Brackets
b52273932a
fix(ui): Auto Router icon not appearing on safari/ios (#3444)
* fix(ui): Auto Router icon not appearing on safari/ios

Closes #3138

* refactor: remove auto-router svg that are no longer in use
2022-03-10 14:37:32 -05:00
Ian Lapham
a33187c33b
feat: routing tooltip for widget (#3259)
* start file updates for routing tooltip

* start tooltip UI

* fix styling

* remove use of px and add header

* UI updates;

* update styles

* update file structure

* update routing components and type

* small code fixes

* fix broken sizing bug

* nit fixes
2022-02-23 14:22:21 -05:00
Zach Pomerantz
ffe334ccbf
feat: update summary view with real values (#3179)
* refactor: isolate approval callback hooks

* fix: use approval callback from trade

* chore: pass optimized trade to summary

* start review screen UI updates

* chore: pass optimized trade to summary

* fix: pass Trade to summary

* remove uneeded value type

* remove uneeded styling

* code cleanup

* code styling, update props

* fix fixture bug, code style updates

* bug fix in details array

* update logic in details

Co-authored-by: ianlapham <ianlapham@gmail.com>
2022-01-25 13:48:52 -05:00
Zach Pomerantz
e5a1cb4276
chore: replace microbundle with rollup (#3115)
* refactor: mv gas estimate chains out of component

* chore: replace microbundle with rollup

* chore: use ts rollup config

* chore: rename lib to widgets

* chore: add rollup doc comment

* feat: rollup typings

* fix: retain tsconfig decl dir
2022-01-13 17:11:27 -08:00
Zach Pomerantz
ac962fb00d
refactor: separate useActiveWeb3React (#3106) 2022-01-12 11:18:11 -08:00
Moody Salem
e2bd8020f3
fix(polygon): enable the smart order router for polygon (#3037)
* fix(polygon): enable the smart order router for polygon

* show gas estimates for polygon
2021-12-23 20:36:56 -05:00
Moody Salem
f047f0d196
feat(polygon): polygon mainnet and testnet support (#3015)
* feat(polygon): polygon mainnet and testnet support

WIP! DO NOT USE

* fix unit test

* fix explorer links

* compute usdc prices

* - fix the header currency label
- fix unit tests

* polygon gradient colors

* chore: adding weth to common bases (#3025)

* adding weth to common bases

* adding usdc and dai

* adding usdt and wbtc

* fix a bunch of polish issues
- 3085 detection
- some wrapping stuff
- the network selector dropdown

* fix wrap/unwrap notification text on polygon

* background color per the figma

* subgraph url

* fix the re-render blinking on the network selector

* failed network switch

* clean up duplicate code in the network switching functions

* fix text color in the privacy notice on light mode

* add some routing constants for polygon

* do not show the separator in the trade route if auto router is not supported

* - network switching without a wallet connected
- remove v2 stuff from pool page when n/a
- remove WMATIC from common bases on polygon

* background colors of network alert

* oops fix background on network alert

* clean up optimism labels

* fix alignment of text on downtime warning

* finish the network alert styles

Co-authored-by: Sara Reynolds <30504811+snreynolds@users.noreply.github.com>
2021-12-22 14:25:10 -05:00