Skip to content
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

Add usdc to mainnet configuration #251

Merged
Changes from 1 commit
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
24 changes: 23 additions & 1 deletion components/buttons/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@ import {
} from 'react'
import { CSS } from '@stitches/react'
import { SWRResponse } from 'swr'
import { useAccount, useNetwork, useSigner, useSwitchNetwork } from 'wagmi'
import {
mainnet,
useAccount,
useNetwork,
useSigner,
useSwitchNetwork,
} from 'wagmi'
import { useConnectModal } from '@rainbow-me/rainbowkit'
import { ToastContext } from 'context/ToastContextProvider'
import { useMarketplaceChain } from 'hooks'
import { constants } from 'ethers'

type ListingCurrencies = ComponentPropsWithoutRef<
typeof ListModal
Expand Down Expand Up @@ -51,6 +58,21 @@ const List: FC<Props> = ({
)

let listingCurrencies: ListingCurrencies = undefined
if (marketplaceChain.id === mainnet.id) {
listingCurrencies = [
{
contract: constants.AddressZero,
symbol: 'ETH',
coinGeckoId: 'ethereum',
},
{
contract: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
symbol: 'USDC',
decimals: 6,
coinGeckoId: 'usd-coin',
},
]
}

const tokenId = token?.token?.tokenId
const contract = token?.token?.contract
Expand Down