parent
4b3e56cd6e
commit
c2827e12f2
|
@ -5,3 +5,4 @@ yarn-error.log
|
|||
build
|
||||
cache
|
||||
.vscode
|
||||
.vercel
|
||||
|
|
|
@ -57,6 +57,9 @@ const configs: Record<typeof process.env.ENV, Config> = {
|
|||
},
|
||||
daapConfig: {
|
||||
readOnlyChainId: ChainId.OptimismGoerli,
|
||||
readOnlyUrls: {
|
||||
[ChainId.OptimismGoerli]: `https://optimism-goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
|
||||
},
|
||||
networks: [OptimismGoerli],
|
||||
notifications: {
|
||||
checkInterval: 500,
|
||||
|
@ -76,6 +79,9 @@ const configs: Record<typeof process.env.ENV, Config> = {
|
|||
},
|
||||
daapConfig: {
|
||||
readOnlyChainId: ChainId.Optimism,
|
||||
readOnlyUrls: {
|
||||
[ChainId.Optimism]: `https://optimism-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
|
||||
},
|
||||
networks: [Optimism],
|
||||
notifications: {
|
||||
checkInterval: 500,
|
||||
|
|
|
@ -11,7 +11,7 @@ export const contracts = {
|
|||
},
|
||||
[ChainId.OptimismGoerli]: {
|
||||
votingContract: '0x744Fd6e98dad09Fb8CCF530B5aBd32B56D64943b',
|
||||
featuredVotingContract: '0x744Fd6e98dad09Fb8CCF530B5aBd32B56D64943b',
|
||||
featuredVotingContract: '0x898331B756EE1f29302DeF227a4471e960c50612',
|
||||
directoryContract: '0xB3Ef5B0825D5f665bE14394eea41E684CE96A4c5',
|
||||
tokenContract: '0xcAD273fA2bb77875333439FDf4417D995159c3E1',
|
||||
multicallContract: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
||||
|
|
|
@ -5,8 +5,8 @@ import { useEffect, useState } from 'react'
|
|||
|
||||
export function useAvailableAmount() {
|
||||
const { account, chainId } = useEthers()
|
||||
// @ts-expect-error Ethers does not type chainId
|
||||
const tokenBalance = useTokenBalance(contracts[chainId ?? 3]?.tokenContract, account)
|
||||
// @ts-expect-error fixme: https://github.com/status-im/community-dapp/pull/94#discussion_r1378964354 undefined or unsupported network
|
||||
const tokenBalance = useTokenBalance(contracts[chainId as keyof typeof contracts | undefined].tokenContract, account)
|
||||
|
||||
const [availableAmount, setAvailableAmount] = useState(0)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ Community directory curator contracts
|
|||
| **Optimism Goerli** | | |
|
||||
| Directory | [`0xB3Ef5B0825D5f665bE14394eea41E684CE96A4c5`](https://goerli-optimism.etherscan.io/address/0xB3Ef5B0825D5f665bE14394eea41E684CE96A4c5) | [`a3967fc`](https://github.com/status-im/community-dapp/commit/a3967fcdf92ddc0c4d814e3fd19fc3bb6b32d2ee) |
|
||||
| VotingContract | [`0x744Fd6e98dad09Fb8CCF530B5aBd32B56D64943b`](https://goerli-optimism.etherscan.io/address/0x744Fd6e98dad09Fb8CCF530B5aBd32B56D64943b) | [`a3967fc`](https://github.com/status-im/community-dapp/commit/a3967fcdf92ddc0c4d814e3fd19fc3bb6b32d2ee) |
|
||||
| FeaturedVotingContract | [`0x898331B756EE1f29302DeF227a4471e960c50612`](https://goerli-optimism.etherscan.io/address/0x744Fd6e98dad09Fb8CCF530B5aBd32B56D64943b) | [`a3967fc`](https://github.com/status-im/community-dapp/commit/a3967fcdf92ddc0c4d814e3fd19fc3bb6b32d2ee) |
|
||||
| FeaturedVotingContract | [`0x898331B756EE1f29302DeF227a4471e960c50612`](https://goerli-optimism.etherscan.io/address/0x898331B756EE1f29302DeF227a4471e960c50612) | [`a3967fc`](https://github.com/status-im/community-dapp/commit/a3967fcdf92ddc0c4d814e3fd19fc3bb6b32d2ee) |
|
||||
| **Optimism Mainnet** | | |
|
||||
| Directory | [`0xA8d270048a086F5807A8dc0a9ae0e96280C41e3A`](https://optimistic.etherscan.io/address/0xA8d270048a086F5807A8dc0a9ae0e96280C41e3A) | [`af44986`](https://github.com/status-im/community-dapp/commit/af449861d7cd259e238136bab7efb09f148fb8bd) |
|
||||
| VotingContract | [`0x321Ba646d994200257Ce4bfe18F66C9283ad1407`](https://optimistic.etherscan.io/address/0x321Ba646d994200257Ce4bfe18F66C9283ad1407) | [`af44986`](https://github.com/status-im/community-dapp/commit/af449861d7cd259e238136bab7efb09f148fb8bd) |
|
||||
|
|
Loading…
Reference in New Issue