-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from lidofinance/develop
Develop to main
- Loading branch information
Showing
17 changed files
with
423 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: CI Dev Goerli | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- goerli | ||
paths-ignore: | ||
- '.github/**' | ||
- 'test/**' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
# test: | ||
# ... | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
# needs: test | ||
name: Build and deploy | ||
steps: | ||
- name: Testnet deploy | ||
uses: lidofinance/dispatch-workflow@v1 | ||
env: | ||
APP_ID: ${{ secrets.APP_ID }} | ||
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} | ||
TARGET_REPO: 'lidofinance/infra-mainnet' | ||
TARGET_WORKFLOW: 'deploy_testnet_ethereum_staking_widget.yaml' | ||
TARGET: 'goerli' | ||
|
||
tests: | ||
needs: deploy | ||
if: ${{ github.event.pull_request.draft == false }} | ||
uses: ./.github/workflows/tests.yml | ||
secrets: inherit | ||
with: | ||
stand_url: https://stake.testnet.fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
export * from './curve'; | ||
export * from './modal-pool-banners'; | ||
export * from './l2-low-fee'; | ||
export * from './l2-swap'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './l2-low-fee'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { FC, useCallback } from 'react'; | ||
import { ThemeProvider, themeDark } from '@lidofinance/lido-ui'; | ||
import { trackEvent } from '@lidofinance/analytics-matomo'; | ||
import { MATOMO_CLICK_EVENTS } from 'config'; | ||
|
||
import { | ||
Wrapper, | ||
L2Icons, | ||
TextWrap, | ||
ButtonWrap, | ||
ButtonLinkWrap, | ||
ButtonStyle, | ||
ContentWrap, | ||
TextHeader, | ||
} from './styles'; | ||
|
||
const LINK = 'https://lido.fi/lido-on-l2'; | ||
|
||
type L2LowFeeProps = { | ||
token: 'stETH' | 'wstETH'; | ||
}; | ||
|
||
export const L2LowFee: FC<L2LowFeeProps> = ({ token }) => { | ||
const linkProps = { | ||
href: LINK, | ||
target: '_blank', | ||
rel: 'noopener noreferrer', | ||
}; | ||
const isStETH = token === 'stETH'; | ||
const linkClickHandler = useCallback(() => { | ||
const event = isStETH | ||
? MATOMO_CLICK_EVENTS.l2LowFeeStake | ||
: MATOMO_CLICK_EVENTS.l2LowFeeWrap; | ||
trackEvent(...event); | ||
}, [isStETH]); | ||
|
||
const text = isStETH | ||
? 'Learn about Lido on L2 opportunities on Arbitrum, Optimism, and Polygon PoS to enjoy reduced gas fees in DeFi' | ||
: 'Bridge wstETH to Arbitrum, Optimism and Polygon PoS to enjoy low gas fees and enhanced opportunities in DeFi'; | ||
|
||
return ( | ||
<Wrapper data-testid="l2LowFeeBanner"> | ||
<ThemeProvider theme={themeDark}> | ||
<ContentWrap> | ||
<TextWrap> | ||
<TextHeader>Unlock Low-Fee transactions on L2</TextHeader> | ||
{text} | ||
</TextWrap> | ||
<ButtonWrap> | ||
<ButtonLinkWrap {...linkProps} onClick={linkClickHandler}> | ||
<ButtonStyle data-testid="l2LowFee" size="sm" color="secondary"> | ||
Learn more | ||
</ButtonStyle> | ||
</ButtonLinkWrap> | ||
</ButtonWrap> | ||
</ContentWrap> | ||
<L2Icons /> | ||
</ThemeProvider> | ||
</Wrapper> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import styled from 'styled-components'; | ||
import { Button } from '@lidofinance/lido-ui'; | ||
import Icons from 'assets/icons/l2-swap.svg'; | ||
|
||
export const Wrapper = styled.div` | ||
text-align: left; | ||
margin-top: 16px; | ||
position: relative; | ||
display: flex; | ||
align-items: center; | ||
padding: ${({ theme }) => theme.spaceMap.lg}px; | ||
border-radius: ${({ theme }) => theme.borderRadiusesMap.lg}px; | ||
height: 174px; | ||
gap: 20px; | ||
overflow: hidden; | ||
background-color: #07080c; | ||
background: linear-gradient(90deg, #3487e5 0%, #006ae3 46.27%); | ||
box-sizing: border-box; | ||
${({ theme }) => theme.mediaQueries.md} { | ||
gap: 2px; | ||
padding: ${({ theme }) => theme.spaceMap.md}px; | ||
} | ||
@media (max-width: 396px) { | ||
cursor: pointer; | ||
padding: ${({ theme }) => theme.spaceMap.sm}px; | ||
} | ||
`; | ||
|
||
export const L2Icons = styled.img.attrs({ | ||
src: Icons, | ||
alt: '', | ||
})` | ||
position: relative; | ||
display: block; | ||
width: 44px; | ||
height: 120px; | ||
`; | ||
|
||
export const ContentWrap = styled.div` | ||
width: 100%; | ||
height: 100%; | ||
box-sizing: border-box; | ||
`; | ||
|
||
export const TextHeader = styled.div` | ||
font-size: 14px; | ||
line-height: 24px; | ||
font-weight: 700; | ||
color: #fff; | ||
margin-bottom: 4px; | ||
`; | ||
|
||
export const TextWrap = styled.div` | ||
flex: 1 1 auto; | ||
color: #fff; | ||
line-height: 20px; | ||
font-size: 12px; | ||
font-weight: 400; | ||
position: relative; | ||
`; | ||
|
||
export const ButtonWrap = styled.div` | ||
display: flex; | ||
margin-top: 12px; | ||
`; | ||
|
||
export const ButtonLinkWrap = styled.a` | ||
display: block; | ||
@media (max-width: 396px) { | ||
position: absolute; | ||
top: 0; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
} | ||
`; | ||
|
||
export const ButtonStyle = styled(Button)` | ||
@media (max-width: 396px) { | ||
display: none; | ||
} | ||
padding: 7px 16px; | ||
font-size: 12px; | ||
line-height: 20px; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './l2-swap'; |
Oops, something went wrong.