Skip to content

Commit

Permalink
base and base sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
CleanBread committed Jan 24, 2025
1 parent f3c9cc4 commit 8da762e
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 14 deletions.
4 changes: 2 additions & 2 deletions local_modules/wallet/chains.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { polygonAmoy, spicy, polygon, gnosis, chiliz } from 'viem/chains'
import { polygonAmoy, spicy, polygon, gnosis, chiliz, base, baseSepolia } from 'viem/chains'


const isDevEnabled = Boolean(JSON.parse(process.env.AZURO_UNSTABLE_DEV_ENABLED || 'false'))

export const appChains = isDevEnabled ? [ polygonAmoy, gnosis, spicy ] as const : [ polygon, polygonAmoy, gnosis, chiliz, spicy ] as const
export const appChains = isDevEnabled ? [ polygonAmoy, gnosis, spicy, baseSepolia ] as const : [ polygon, polygonAmoy, gnosis, chiliz, spicy, base ] as const
6 changes: 4 additions & 2 deletions local_modules/wallet/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { cookieStorage, createStorage, http } from 'wagmi'
import { type PrivyConfig } from '@azuro-org/sdk-social-aa-connector'
import { createConfig } from '@privy-io/wagmi'
import { polygon, polygonAmoy, gnosis, chiliz, spicy } from 'viem/chains'
import { polygon, polygonAmoy, gnosis, chiliz, spicy, base, baseSepolia } from 'viem/chains'
import { constants } from 'helpers'

import { appChains } from './chains'
Expand Down Expand Up @@ -39,13 +39,15 @@ const wagmiConfig = createConfig({
[gnosis.id]: http(constants.rpcByChains[gnosis.id]),
[chiliz.id]: http(constants.rpcByChains[chiliz.id]),
[spicy.id]: http(constants.rpcByChains[spicy.id]),
[base.id]: http(constants.rpcByChains[base.id]),
[baseSepolia.id]: http(constants.rpcByChains[baseSepolia.id]),
},
ssr: false,
syncConnectedChain: true,
multiInjectedProviderDiscovery: true,
storage: createStorage({
storage: cookieStorage,
})
}),
})

declare module 'wagmi' {
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@apollo/client": "^3.11.1",
"@azuro-org/dictionaries": "^3.0.26",
"@azuro-org/sdk": "5.4.0",
"@azuro-org/sdk": "5.4.1",
"@azuro-org/sdk-social-aa-connector": "^1.0.6",
"@floating-ui/react-dom-interactions": "^0.13.3",
"@glidejs/glide": "^3.6.2",
Expand Down
1 change: 1 addition & 0 deletions public/images/icons/currency/weth.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/components/ui/Icon/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ import _currency_usdt from '../../../../public/images/icons/currency/usdt.svg?ur
import _currency_usdtSource from '!!raw-loader!../../../../public/images/icons/currency/usdt.svg'
import _currency_wchz from '../../../../public/images/icons/currency/wchz.svg?url'
import _currency_wchzSource from '!!raw-loader!../../../../public/images/icons/currency/wchz.svg'
import _currency_weth from '../../../../public/images/icons/currency/weth.svg?url'
import _currency_wethSource from '!!raw-loader!../../../../public/images/icons/currency/weth.svg'
import _currency_wxdai from '../../../../public/images/icons/currency/wxdai.svg?url'
import _currency_wxdaiSource from '!!raw-loader!../../../../public/images/icons/currency/wxdai.svg'

Expand Down Expand Up @@ -290,6 +292,7 @@ const icons = {
'currency/usdc': { src: _currency_usdc.src, source: isServer && _currency_usdcSource, width: _currency_usdc.width, height: _currency_usdc.height, aspect: _currency_usdc.width/_currency_usdc.height },
'currency/usdt': { src: _currency_usdt.src, source: isServer && _currency_usdtSource, width: _currency_usdt.width, height: _currency_usdt.height, aspect: _currency_usdt.width/_currency_usdt.height },
'currency/wchz': { src: _currency_wchz.src, source: isServer && _currency_wchzSource, width: _currency_wchz.width, height: _currency_wchz.height, aspect: _currency_wchz.width/_currency_wchz.height },
'currency/weth': { src: _currency_weth.src, source: isServer && _currency_wethSource, width: _currency_weth.width, height: _currency_weth.height, aspect: _currency_weth.width/_currency_weth.height },
'currency/wxdai': { src: _currency_wxdai.src, source: isServer && _currency_wxdaiSource, width: _currency_wxdai.width, height: _currency_wxdai.height, aspect: _currency_wxdai.width/_currency_wxdai.height }
} as const

Expand Down
8 changes: 7 additions & 1 deletion src/helpers/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { chiliz, gnosis, polygon, polygonAmoy, spicy } from 'viem/chains'
import { chiliz, gnosis, polygon, polygonAmoy, spicy, base, baseSepolia } from 'viem/chains'
import { type ChainId } from '@azuro-org/toolkit'
import { type IconName } from 'components/ui'

Expand All @@ -14,6 +14,8 @@ const rpcByChains: Record<ChainId, string> = {
[polygonAmoy.id]: 'https://polygon-amoy-bor-rpc.publicnode.com',
[chiliz.id]: 'https://chiliz-rpc.publicnode.com',
[spicy.id]: 'https://chiliz-spicy-rpc.publicnode.com',
[base.id]: 'https://base-rpc.publicnode.com',
[baseSepolia.id]: 'https://base-sepolia-rpc.publicnode.com',
} as const

const chainIcons: Record<ChainId, IconName> = {
Expand All @@ -22,6 +24,8 @@ const chainIcons: Record<ChainId, IconName> = {
[polygonAmoy.id]: 'networks/polygon',
[chiliz.id]: 'networks/chiliz',
[spicy.id]: 'networks/chiliz',
[base.id]: 'networks/base',
[baseSepolia.id]: 'networks/base',
}

const currencyIcons: Record<ChainId, IconName> = {
Expand All @@ -30,6 +34,8 @@ const currencyIcons: Record<ChainId, IconName> = {
[polygonAmoy.id]: 'currency/azusd',
[chiliz.id]: 'currency/wchz',
[spicy.id]: 'currency/wchz',
[base.id]: 'currency/weth',
[baseSepolia.id]: 'currency/weth',
}

const sportsOrder = [ 'politics', 'football', 'basketball', 'tennis', 'cricket', 'mma', 'boxing', 'ice-hockey', 'american-football', 'baseball', 'rugby-union', 'rugby-league' ]
Expand Down

0 comments on commit 8da762e

Please sign in to comment.