Skip to content

Commit

Permalink
Merge pull request #318 from reservoirprotocol/pedro/grwth-3277-disab…
Browse files Browse the repository at this point in the history
…le-oracle-bids-on-unsupported-chains

Only enable oracle bidding on supported chains
  • Loading branch information
pedromcunha authored Sep 14, 2023
2 parents 9caff7a + b179fbd commit f0dd8e4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/buttons/Bid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const Bid: FC<Props> = ({
openState={openState}
feesBps={orderFees}
currencies={bidCurrencies}
oracleEnabled={true}
oracleEnabled={marketplaceChain.oracleBidsEnabled}
chainId={marketplaceChain.id}
onClose={(data, stepData, currentStep) => {
if (mutate && currentStep == BidStep.Complete) mutate()
Expand Down
2 changes: 1 addition & 1 deletion components/buttons/CollectionOffer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const CollectionOffer: FC<Props> = ({
attribute={attribute}
feesBps={orderFees}
currencies={bidCurrencies}
oracleEnabled={true}
oracleEnabled={marketplaceChain.oracleBidsEnabled}
chainId={marketplaceChain.id}
onClose={(data, stepData, currentStep) => {
if (mutate && currentStep == BidStep.Complete) mutate()
Expand Down
13 changes: 12 additions & 1 deletion utils/chains.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import { Currency } from '@reservoir0x/reservoir-kit-ui'
import wrappedContracts from './wrappedContracts'
import { zeroAddress } from 'viem'
import { arbitrum, mainnet, polygon, optimism, Chain, bsc, avalanche } from 'wagmi/chains'
import {
arbitrum,
mainnet,
polygon,
optimism,
Chain,
bsc,
avalanche,
} from 'wagmi/chains'
import usdcContracts from './usdcContracts'

//Chains that are missing from wagmi:
Expand Down Expand Up @@ -134,6 +142,7 @@ export type ReservoirChain = Chain & {
community?: string
wssUrl?: string
listingCurrencies?: Currency[]
oracleBidsEnabled?: boolean
}

const nativeCurrencyBase = {
Expand Down Expand Up @@ -184,6 +193,7 @@ export const DefaultChain: ReservoirChain = {
contract: usdcContracts[mainnet.id],
},
],
oracleBidsEnabled: true,
}

export default [
Expand Down Expand Up @@ -218,6 +228,7 @@ export default [
coinGeckoId: 'weth',
},
],
oracleBidsEnabled: true,
},
{
...arbitrum,
Expand Down

2 comments on commit f0dd8e4

@vercel
Copy link

@vercel vercel bot commented on f0dd8e4 Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

artblocks-v2 – ./

artblocks-v2-git-main-unevenlabs.vercel.app
artblocks-v2.vercel.app
artblocks-v2-unevenlabs.vercel.app

@vercel
Copy link

@vercel vercel bot commented on f0dd8e4 Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.