Skip to content

Commit

Permalink
refactor: add main currency to network config
Browse files Browse the repository at this point in the history
  • Loading branch information
LuccaBitfly committed Jan 13, 2025
1 parent 9de41df commit 3f6ef1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontend/types/currencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const CryptoCurrencies = [
'GNO',
'DAI',
'xDAI',
'mGNO',
] as const
type CryptoCurrency = (typeof CryptoCurrencies)[number]
const Native = 'NAT' as const
Expand Down
8 changes: 7 additions & 1 deletion frontend/types/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export interface ChainInfoFields {
description: string,
elCurrency: CryptoCurrency,
family: ChainFamily,
mainCurrency: CryptoCurrency,
mainNet: ChainId,
name: string,
nameParts: string[],
Expand All @@ -43,6 +44,7 @@ export const ChainInfo: Record<ChainId, ChainInfoFields> = {
description: 'Any network',
elCurrency: 'ETH',
family: ChainFamily.Any,
mainCurrency: 'ETH',
mainNet: ChainIDs.Any,
name: 'Any network',
nameParts: [
Expand All @@ -60,6 +62,7 @@ export const ChainInfo: Record<ChainId, ChainInfoFields> = {
description: 'Mainnet',
elCurrency: 'ETH',
family: ChainFamily.Ethereum,
mainCurrency: 'ETH',
mainNet: ChainIDs.Ethereum,
name: 'Ethereum',
nameParts: [
Expand All @@ -73,10 +76,11 @@ export const ChainInfo: Record<ChainId, ChainInfoFields> = {
timeStampSlot0: 1606824023,
},
[ChainIDs.Gnosis]: {
clCurrency: 'GNO',
clCurrency: 'mGNO',
description: '',
elCurrency: 'xDAI',
family: ChainFamily.Gnosis,
mainCurrency: 'GNO',
mainNet: ChainIDs.Gnosis,
name: 'Gnosis',
nameParts: [
Expand All @@ -95,6 +99,7 @@ export const ChainInfo: Record<ChainId, ChainInfoFields> = {
description: 'Testnet',
elCurrency: 'ETH',
family: ChainFamily.Ethereum,
mainCurrency: 'ETH',
mainNet: ChainIDs.Ethereum,
name: 'Ethereum Holesky',
nameParts: [
Expand All @@ -112,6 +117,7 @@ export const ChainInfo: Record<ChainId, ChainInfoFields> = {
description: 'Testnet',
elCurrency: 'ETH',
family: ChainFamily.Ethereum,
mainCurrency: 'ETH',
mainNet: ChainIDs.Ethereum,
name: 'Ethereum Sepolia',
nameParts: [
Expand Down

0 comments on commit 3f6ef1a

Please sign in to comment.