Skip to content

Commit

Permalink
feature: custom swap fee label (#3692)
Browse files Browse the repository at this point in the history
  • Loading branch information
compojoom authored May 13, 2024
1 parent 7b5ba97 commit d3a5aa4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@gnosis.pm/zodiac/**/ethers": "^6.11.1"
},
"dependencies": {
"@cowprotocol/widget-react": "0.8.2",
"@cowprotocol/widget-react": "^0.9.1",
"@ducanh2912/next-pwa": "^9.7.1",
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.0",
Expand Down
8 changes: 7 additions & 1 deletion src/features/swap/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { FEATURES } from '@/utils/chains'
import { type CowSwapWidgetParams, TradeType, CowSwapWidget } from '@cowprotocol/widget-react'
import { CowSwapWidget } from '@cowprotocol/widget-react'
import { type CowSwapWidgetParams, TradeType } from '@cowprotocol/widget-lib'
import { CowEvents, type CowEventListeners } from '@cowprotocol/events'
import { useState, useEffect, type MutableRefObject, useMemo } from 'react'
import { Container, Grid, useTheme } from '@mui/material'
Expand Down Expand Up @@ -188,6 +189,11 @@ const SwapWidget = ({ sell }: Params) => {
warning: palette.warning.main,
alert: palette.warning.main,
},
content: {
feeLabel: 'No fee for one month',
feeTooltipMarkdown:
'The transaction fee incurred here will contribute to a license fee that supports the Safe Ecosystem Foundation (SEF). SEF does not operate this service.',
},
})
}, [sell, palette, darkMode, tradeType, chainId])

Expand Down
28 changes: 14 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1210,24 +1210,24 @@
json-stringify-deterministic "^1.0.8"
multiformats "^9.6.4"

"@cowprotocol/events@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@cowprotocol/events/-/events-1.2.1.tgz#f23bbb46f6e9e86af1eefecb99af47089aec748b"
integrity sha512-Ey5j9oW432Yi1ZiJAu1wv6Hps3EzqOLCHnLo5CFa/6Txl7i4XqPx/0iHTf6eAgaTKOHF+LYn5WDk5mqvZ4Qqmw==
"@cowprotocol/events@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@cowprotocol/events/-/events-1.3.0.tgz#44c175689d0f9bbd769901e7b0e4ecd33ec55697"
integrity sha512-gYTbm8stIXJI/a+jWcjAdDtIo5NX2Q88Q90XETJE2MaLIR7LQL0Ao4mW0J9LsYIvE7Zb7QEdduJ56pNXmQh5/g==

"@cowprotocol/widget-lib@^0.10.1":
version "0.10.1"
resolved "https://registry.yarnpkg.com/@cowprotocol/widget-lib/-/widget-lib-0.10.1.tgz#c62e675389e04aae80d85ab715af344cb8280c2e"
integrity sha512-+llpU0684yusqT1xvi99PgQaYa2z+aaEPjFgb0P/qed04Iot6lIo2cr5SnATlvBmtROfTKlA/ppGiKKuQdooYQ==
"@cowprotocol/widget-lib@^0.11.1":
version "0.11.1"
resolved "https://registry.yarnpkg.com/@cowprotocol/widget-lib/-/widget-lib-0.11.1.tgz#df2906ba33215931582172bfa5b2ab5c512f2d83"
integrity sha512-xMD3D3hw3HrRX5jpF5LEziopnPjKTd28FQcZ4f7p0SStzDgYoiGAHNGDxcefafklS6Osi22IjamDZ6bGp/Ul3g==
dependencies:
"@cowprotocol/events" "^1.2.1"
"@cowprotocol/events" "^1.3.0"

"@cowprotocol/widget-react@0.8.2":
version "0.8.2"
resolved "https://registry.yarnpkg.com/@cowprotocol/widget-react/-/widget-react-0.8.2.tgz#b1bc6ff22993d14c16c399545fbd2f470911ebd0"
integrity sha512-PMvqAU1XMaD5sQC7Y4dNh2PN2i965mX3ywJ1PpWUPnKJKF3+jY14iaXo6xpJMQj4wQjAub8qvlBnMso/QtF5sA==
"@cowprotocol/widget-react@^0.9.1":
version "0.9.1"
resolved "https://registry.yarnpkg.com/@cowprotocol/widget-react/-/widget-react-0.9.1.tgz#d4c82028c4a02361984ed892ee677a96a7669320"
integrity sha512-EWq/5EVRFf2kGUJNHeJ7c2JedFSioXrHAbf+4I25+g+pAkUbrzwjxJSeppovLwXpv7umqHqEQaw7jsctpacjEw==
dependencies:
"@cowprotocol/widget-lib" "^0.10.1"
"@cowprotocol/widget-lib" "^0.11.1"

"@cypress/[email protected]":
version "2.88.12"
Expand Down

0 comments on commit d3a5aa4

Please sign in to comment.