Skip to content

Commit

Permalink
fix: added support of gnosis chain payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
Argeare5 committed Dec 19, 2023
1 parent 89efd53 commit 44b95e6
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@bgd-labs/aave-address-book": "^2.13.0",
"@bgd-labs/aave-governance-ui-helpers": "^1.0.7",
"@bgd-labs/aave-governance-ui-helpers": "^1.0.8",
"@bgd-labs/frontend-web3-utils": "^1.0.3",
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.1",
Expand Down
1 change: 1 addition & 0 deletions public/images/networks/gnosis.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/payloadsExplorer/components/PayloadsExplorerPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { SelectField } from '../../ui/components/SelectField';
import { TopPanelContainer } from '../../ui/components/TopPanelContainer';
import { IconBox } from '../../ui/primitives/IconBox';
import { texts } from '../../ui/utils/texts';
import { appConfig } from '../../utils/appConfig';
import { appConfig, appUsedNetworks } from '../../utils/appConfig';
import {
getLocalStoragePayloadsExplorerView,
setLocalStoragePayloadsExplorerView,
Expand Down Expand Up @@ -178,7 +178,7 @@ export function PayloadsExplorerPage() {
onChange={(event) => {
setChainId(event);
}}
options={appConfig.payloadsControllerChainIds}
options={appUsedNetworks}
/>
</InputWrapper>
) : (
Expand Down
3 changes: 3 additions & 0 deletions src/ui/components/NetworkIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
base,
bsc,
bscTestnet,
gnosis,
goerli,
mainnet,
metis,
Expand Down Expand Up @@ -56,6 +57,8 @@ const getIconNetworkName = (chainId: number) => {
return 'metis';
case optimism.id:
return 'optimism';
case gnosis.id:
return 'gnosis';
default:
return 'ethereum';
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/utils/themeMUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function createEmotionCache() {
}

export const media = {
xs: '(min-width: 420px)',
xs: '(min-width: 465px)',
sm: '(min-width: 768px)',
md: '(min-width: 1024px)',
lg: '(min-width: 1400px)',
Expand Down
5 changes: 4 additions & 1 deletion src/utils/appConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
payloadsControllerChainIds,
votingMachineChainIds,
} from '@bgd-labs/aave-governance-ui-helpers';
import { bsc } from 'viem/chains';

export const isForIPFS = process.env.NEXT_PUBLIC_DEPLOY_FOR_IPFS === 'true';
export const isTermsAndConditionsVisible =
Expand All @@ -19,6 +20,8 @@ export const isTestnet = coreName === 'goerli' || coreName === 'sepolia';
export const appUsedNetworks: number[] = [
...votingMachineChainIds[coreName],
...payloadsControllerChainIds[coreName],
].filter((value, index, self) => self.indexOf(value) === index);
]
.filter((value, index, self) => self.indexOf(value) === index)
.filter((value) => value !== bsc.id);

export const appConfig = appConfigInit(coreName);
6 changes: 6 additions & 0 deletions src/utils/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
base,
bsc,
bscTestnet,
gnosis,
goerli,
mainnet,
metis,
Expand Down Expand Up @@ -54,6 +55,10 @@ export const initialRpcUrls: Record<number, string[]> = {
'https://optimism.blockpi.network/v1/rpc/public',
'https://optimism.publicnode.com',
],
[gnosis.id]: [
'https://gnosis.blockpi.network/v1/rpc/public',
'https://gnosis-mainnet.public.blastapi.io',
],
// testnets
[goerli.id]: [
'https://ethereum-goerli.publicnode.com',
Expand Down Expand Up @@ -96,6 +101,7 @@ export const CHAINS: Record<number, Chain> = {
[arbitrum.id]: setChain(arbitrum),
[metis.id]: setChain(metis),
[optimism.id]: setChain(optimism),
[gnosis.id]: setChain(gnosis),
// testnets
[goerli.id]: setChain(goerli),
[sepolia.id]: setChain(sepolia),
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1281,10 +1281,10 @@
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-2.13.0.tgz#1c2dc3f8fdcb6d37e74715bc04261f9eed71c5ca"
integrity sha512-Ai1q9nW6WpY+R9EtfAaN4Qz8vRQZCIksvQler4Jr7XotyhRNBK9j8kMl4wCK9iO2jOKdEX3n7I0IB+xxAOCzLQ==

"@bgd-labs/aave-governance-ui-helpers@^1.0.7":
version "1.0.7"
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-governance-ui-helpers/-/aave-governance-ui-helpers-1.0.7.tgz#d233ff97e221829d9f275ab20077deb6a8181405"
integrity sha512-r7b4MTeRxvO0oB07c8dCfusnEkM3c/wUqT0feNvadY6eq7hroHOaYBtie3kg0cSG4r8MNw6bj+bjor9LMj4KsQ==
"@bgd-labs/aave-governance-ui-helpers@^1.0.8":
version "1.0.8"
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-governance-ui-helpers/-/aave-governance-ui-helpers-1.0.8.tgz#5a1b85dabedb4d6d35e2c3bcd902913b02003c76"
integrity sha512-iZ4t9zJ7KU3pzibpjJ3BjJ+XzZbWhfefXQqAUXdrapiZgpL1fxG/P31n6cKYMs0wvOs77NmUK+OPymG2lpHF9g==
dependencies:
bs58 "^5.0.0"
dayjs "^1.11.10"
Expand Down

1 comment on commit 44b95e6

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

This commit was deployed on ipfs

Please sign in to comment.