Skip to content

Commit

Permalink
Merge pull request #291 from G7DAO/feat/relay-bridge
Browse files Browse the repository at this point in the history
Feat/relay bridge
  • Loading branch information
elclandestin0 authored Jan 17, 2025
2 parents 7cc6fe5 + 946cb30 commit d625812
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ const RelayPage = () => {
const pendingTransacions = usePendingTransactions(connectedAccount)
const [notificationsOffset] = useState(0)
const [notificationsLimit] = useState(10)
// const [selectedToken, setSelectedToken] = useState<SwapWidgetToken | undefined>(XAI)
const [amount] = useState('0.1')

const notifications = useNotifications(connectedAccount, notificationsOffset, notificationsLimit)
const { newNotifications, refetchNewNotifications } = useBridgeNotificationsContext()

Expand All @@ -60,7 +59,6 @@ const RelayPage = () => {
<div className={styles.viewContainer}>
<div className={styles.mainContainer}>
<SwapWidget
defaultAmount={amount}
defaultToToken={XAI}
defaultToAddress={connectedAccount as Address}
supportedWalletVMs={['evm']}
Expand Down
27 changes: 25 additions & 2 deletions webapps/world-builder-dashboard/src/utils/relayConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { SwapWidgetToken } from '@/pages/RelayPage/RelayPage'
import { convertViemChainToRelayChain } from '@reservoir0x/relay-sdk'
import { http } from 'viem'
import { mainnet, arbitrum, base, optimism, polygon, zksync, xai, mantle } from 'viem/chains'
import { ancient8, apeChain, arbitrumNova, avalanche, b3, bsc, mainnet, arbitrum, base, optimism, polygon, zksync, xai, mantle, zora, superposition } from 'viem/chains'
import { createConfig } from 'wagmi'

export const chains = [
Expand All @@ -14,12 +14,35 @@ export const chains = [
convertViemChainToRelayChain(zksync),
convertViemChainToRelayChain(xai),
convertViemChainToRelayChain(mantle),
convertViemChainToRelayChain(ancient8),
convertViemChainToRelayChain(apeChain),
convertViemChainToRelayChain(arbitrumNova),
convertViemChainToRelayChain(avalanche),
convertViemChainToRelayChain(b3),
convertViemChainToRelayChain(bsc),
convertViemChainToRelayChain(zora),
convertViemChainToRelayChain(superposition),
]

export const wagmiConfig = createConfig({
chains: [mainnet],
chains: [mainnet, arbitrum, base, optimism, polygon, zksync, xai, mantle],
transports: {
[mainnet.id]: http(),
[arbitrum.id]: http(),
[base.id]: http(),
[optimism.id]: http(),
[polygon.id]: http(),
[zksync.id]: http(),
[xai.id]: http(),
[mantle.id]: http(),
[ancient8.id]: http(),
[apeChain.id]: http(),
[arbitrumNova.id]: http(),
[avalanche.id]: http(),
[b3.id]: http(),
[bsc.id]: http(),
[zora.id]: http(),
[superposition.id]: http(),
}
})

Expand Down

0 comments on commit d625812

Please sign in to comment.