Commit 912eb829 authored by eddie's avatar eddie Committed by GitHub

feat: setup widget integration update (#6045)

* feat: setup widget integration update

* feat: preview of widget token selector

* feat: upgrade widget again for token selector

* fix: add back legacy token selector

* fix: token

* fix: upgrade again

* fix: tooltip bug

* fix: for real

* fix: updates
parent 2ddf3fe6
...@@ -24,7 +24,6 @@ const BodyText = styled.div` ...@@ -24,7 +24,6 @@ const BodyText = styled.div`
font-size: 14px; font-size: 14px;
` `
const RootWrapper = styled.div` const RootWrapper = styled.div`
position: relative;
margin-top: 16px; margin-top: 16px;
` `
...@@ -101,7 +100,6 @@ const ContentWrapper = styled.div<{ chainId: NetworkAlertChains; darkMode: boole ...@@ -101,7 +100,6 @@ const ContentWrapper = styled.div<{ chainId: NetworkAlertChains; darkMode: boole
position: absolute; position: absolute;
transform: rotate(25deg) translate(-90px, -40px); transform: rotate(25deg) translate(-90px, -40px);
width: 300px; width: 300px;
z-index: -1;
} }
` `
const Header = styled.h2` const Header = styled.h2`
......
...@@ -9,6 +9,7 @@ import { Trade } from '@uniswap/router-sdk' ...@@ -9,6 +9,7 @@ import { Trade } from '@uniswap/router-sdk'
import { Currency, TradeType } from '@uniswap/sdk-core' import { Currency, TradeType } from '@uniswap/sdk-core'
import { import {
AddEthereumChainParameter, AddEthereumChainParameter,
DialogAnimationType,
EMPTY_TOKEN_LIST, EMPTY_TOKEN_LIST,
OnReviewSwapClick, OnReviewSwapClick,
SwapWidget, SwapWidget,
...@@ -161,6 +162,7 @@ export default function Widget({ ...@@ -161,6 +162,7 @@ export default function Widget({
return ( return (
<> <>
<div style={{ zIndex: 1, position: 'relative' }}>
<SwapWidget <SwapWidget
hideConnectionUI hideConnectionUI
brandedFooter={false} brandedFooter={false}
...@@ -183,10 +185,15 @@ export default function Widget({ ...@@ -183,10 +185,15 @@ export default function Widget({
onSwapApprove={onApproveToken} onSwapApprove={onApproveToken}
onInitialSwapQuote={onInitialSwapQuote} onInitialSwapQuote={onInitialSwapQuote}
onSwapPriceUpdateAck={onSwapPriceUpdateAck} onSwapPriceUpdateAck={onSwapPriceUpdateAck}
dialogOptions={{
pageCentered: true,
animationType: DialogAnimationType.FADE,
}}
onError={(error, errorInfo) => { onError={(error, errorInfo) => {
sendAnalyticsEvent(SwapEventName.SWAP_ERROR, { error, errorInfo, ...trace }) sendAnalyticsEvent(SwapEventName.SWAP_ERROR, { error, errorInfo, ...trace })
}} }}
/> />
</div>
{tokenSelector} {tokenSelector}
</> </>
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment