set provider in `readOnlyUrls`

(cherry picked from commit 8802e7ca43)
This commit is contained in:
Felicio Mununga 2023-11-03 22:17:51 +01:00
parent 4b3e56cd6e
commit c2827e12f2
No known key found for this signature in database
GPG Key ID: C4736C7AEBA55BE5
5 changed files with 11 additions and 4 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ yarn-error.log
build build
cache cache
.vscode .vscode
.vercel

View File

@ -57,6 +57,9 @@ const configs: Record<typeof process.env.ENV, Config> = {
}, },
daapConfig: { daapConfig: {
readOnlyChainId: ChainId.OptimismGoerli, readOnlyChainId: ChainId.OptimismGoerli,
readOnlyUrls: {
[ChainId.OptimismGoerli]: `https://optimism-goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
},
networks: [OptimismGoerli], networks: [OptimismGoerli],
notifications: { notifications: {
checkInterval: 500, checkInterval: 500,
@ -76,6 +79,9 @@ const configs: Record<typeof process.env.ENV, Config> = {
}, },
daapConfig: { daapConfig: {
readOnlyChainId: ChainId.Optimism, readOnlyChainId: ChainId.Optimism,
readOnlyUrls: {
[ChainId.Optimism]: `https://optimism-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
},
networks: [Optimism], networks: [Optimism],
notifications: { notifications: {
checkInterval: 500, checkInterval: 500,

View File

@ -11,7 +11,7 @@ export const contracts = {
}, },
[ChainId.OptimismGoerli]: { [ChainId.OptimismGoerli]: {
votingContract: '0x744Fd6e98dad09Fb8CCF530B5aBd32B56D64943b', votingContract: '0x744Fd6e98dad09Fb8CCF530B5aBd32B56D64943b',
featuredVotingContract: '0x744Fd6e98dad09Fb8CCF530B5aBd32B56D64943b', featuredVotingContract: '0x898331B756EE1f29302DeF227a4471e960c50612',
directoryContract: '0xB3Ef5B0825D5f665bE14394eea41E684CE96A4c5', directoryContract: '0xB3Ef5B0825D5f665bE14394eea41E684CE96A4c5',
tokenContract: '0xcAD273fA2bb77875333439FDf4417D995159c3E1', tokenContract: '0xcAD273fA2bb77875333439FDf4417D995159c3E1',
multicallContract: '0xcA11bde05977b3631167028862bE2a173976CA11', multicallContract: '0xcA11bde05977b3631167028862bE2a173976CA11',

View File

@ -5,8 +5,8 @@ import { useEffect, useState } from 'react'
export function useAvailableAmount() { export function useAvailableAmount() {
const { account, chainId } = useEthers() const { account, chainId } = useEthers()
// @ts-expect-error Ethers does not type chainId // @ts-expect-error fixme: https://github.com/status-im/community-dapp/pull/94#discussion_r1378964354 undefined or unsupported network
const tokenBalance = useTokenBalance(contracts[chainId ?? 3]?.tokenContract, account) const tokenBalance = useTokenBalance(contracts[chainId as keyof typeof contracts | undefined].tokenContract, account)
const [availableAmount, setAvailableAmount] = useState(0) const [availableAmount, setAvailableAmount] = useState(0)

View File

@ -9,7 +9,7 @@ Community directory curator contracts
| **Optimism Goerli** | | | | **Optimism Goerli** | | |
| Directory | [`0xB3Ef5B0825D5f665bE14394eea41E684CE96A4c5`](https://goerli-optimism.etherscan.io/address/0xB3Ef5B0825D5f665bE14394eea41E684CE96A4c5) | [`a3967fc`](https://github.com/status-im/community-dapp/commit/a3967fcdf92ddc0c4d814e3fd19fc3bb6b32d2ee) | | 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) | | 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** | | | | **Optimism Mainnet** | | |
| Directory | [`0xA8d270048a086F5807A8dc0a9ae0e96280C41e3A`](https://optimistic.etherscan.io/address/0xA8d270048a086F5807A8dc0a9ae0e96280C41e3A) | [`af44986`](https://github.com/status-im/community-dapp/commit/af449861d7cd259e238136bab7efb09f148fb8bd) | | 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) | | VotingContract | [`0x321Ba646d994200257Ce4bfe18F66C9283ad1407`](https://optimistic.etherscan.io/address/0x321Ba646d994200257Ce4bfe18F66C9283ad1407) | [`af44986`](https://github.com/status-im/community-dapp/commit/af449861d7cd259e238136bab7efb09f148fb8bd) |