From 3f6ef1a7bc5ae960028439e972327a59f5ae2b17 Mon Sep 17 00:00:00 2001 From: Lucca Dukic <109136188+LuccaBitfly@users.noreply.github.com> Date: Mon, 13 Jan 2025 15:42:48 +0100 Subject: [PATCH] refactor: add main currency to network config --- frontend/types/currencies.ts | 1 + frontend/types/network.ts | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/types/currencies.ts b/frontend/types/currencies.ts index b086d75aa..0e83df8bc 100644 --- a/frontend/types/currencies.ts +++ b/frontend/types/currencies.ts @@ -14,6 +14,7 @@ const CryptoCurrencies = [ 'GNO', 'DAI', 'xDAI', + 'mGNO', ] as const type CryptoCurrency = (typeof CryptoCurrencies)[number] const Native = 'NAT' as const diff --git a/frontend/types/network.ts b/frontend/types/network.ts index 940f737d6..c5e0d651e 100644 --- a/frontend/types/network.ts +++ b/frontend/types/network.ts @@ -27,6 +27,7 @@ export interface ChainInfoFields { description: string, elCurrency: CryptoCurrency, family: ChainFamily, + mainCurrency: CryptoCurrency, mainNet: ChainId, name: string, nameParts: string[], @@ -43,6 +44,7 @@ export const ChainInfo: Record = { description: 'Any network', elCurrency: 'ETH', family: ChainFamily.Any, + mainCurrency: 'ETH', mainNet: ChainIDs.Any, name: 'Any network', nameParts: [ @@ -60,6 +62,7 @@ export const ChainInfo: Record = { description: 'Mainnet', elCurrency: 'ETH', family: ChainFamily.Ethereum, + mainCurrency: 'ETH', mainNet: ChainIDs.Ethereum, name: 'Ethereum', nameParts: [ @@ -73,10 +76,11 @@ export const ChainInfo: Record = { timeStampSlot0: 1606824023, }, [ChainIDs.Gnosis]: { - clCurrency: 'GNO', + clCurrency: 'mGNO', description: '', elCurrency: 'xDAI', family: ChainFamily.Gnosis, + mainCurrency: 'GNO', mainNet: ChainIDs.Gnosis, name: 'Gnosis', nameParts: [ @@ -95,6 +99,7 @@ export const ChainInfo: Record = { description: 'Testnet', elCurrency: 'ETH', family: ChainFamily.Ethereum, + mainCurrency: 'ETH', mainNet: ChainIDs.Ethereum, name: 'Ethereum Holesky', nameParts: [ @@ -112,6 +117,7 @@ export const ChainInfo: Record = { description: 'Testnet', elCurrency: 'ETH', family: ChainFamily.Ethereum, + mainCurrency: 'ETH', mainNet: ChainIDs.Ethereum, name: 'Ethereum Sepolia', nameParts: [