8000 fix: Buy COW link by elena-zh · Pull Request #5899 · cowprotocol/cowswap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: Buy COW link #5899

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

Merged
merged 4 commits into from
Jun 30, 2025
Merged
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions apps/cowswap-frontend/src/pages/Account/Balances.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import CowImage from '@cowprotocol/assets/cow-swap/cow_token.svg'
import vCOWImage from '@cowprotocol/assets/images/vCOW.svg'
import { useCurrencyAmountBalance } from '@cowprotocol/balances-and-allowances'
import { COW_TOKEN_TO_CHAIN, COW_CONTRACT_ADDRESS, V_COW } from '@cowprotocol/common-const'
import { WRAPPED_NATIVE_CURRENCIES as WETH } from '@cowprotocol/common-const'
import { usePrevious } from '@cowprotocol/common-hooks'
import { getBlockExplorerUrl, getProviderErrorMessage } from '@cowprotocol/common-utils'
import { ButtonPrimary, HoverTooltip, TokenAmount } from '@cowprotocol/ui'
Expand Down Expand Up @@ -58,7 +59,7 @@ export default function Profile() {
const previousAccount = usePrevious(account)

const cowContractAddress = COW_CONTRACT_ADDRESS[chainId]

const nativeWrappedToken = WETH[chainId]
const isProviderNetworkUnsupported = useIsProviderNetworkUnsupported()
const blockNumber = useBlockNumber()
const [confirmationBlock, setConfirmationBlock] = useState<undefined | number>(undefined)
Expand Down Expand Up @@ -300,7 +301,7 @@ export default function Profile() {
}
/>

<Link to={`/swap?outputCurrency=${COW_CONTRACT_ADDRESS[chainId]}`}>Buy COW</Link>
<Link to={`/${chainId}/swap/${nativeWrappedToken.address}/${COW_CONTRACT_ADDRESS[chainId]}`}>Buy COW</Link>
</CardActions>
</Card>
)}
Expand Down
Loading
0