fix: update the list of chains supported by opensea

This commit is contained in:
Dario Gabriel Lipicar 2024-01-11 13:50:14 -03:00 committed by dlipicar
parent e53f31ff1f
commit 250b8eea87
2 changed files with 4 additions and 7 deletions

View File

@ -22,7 +22,7 @@ func getV2BaseURL(chainID walletCommon.ChainID) (string, error) {
switch uint64(chainID) { switch uint64(chainID) {
case walletCommon.EthereumMainnet, walletCommon.ArbitrumMainnet, walletCommon.OptimismMainnet: case walletCommon.EthereumMainnet, walletCommon.ArbitrumMainnet, walletCommon.OptimismMainnet:
return "https://api.opensea.io/v2", nil return "https://api.opensea.io/v2", nil
case walletCommon.EthereumGoerli, walletCommon.EthereumSepolia, walletCommon.ArbitrumGoerli, walletCommon.ArbitrumSepolia, walletCommon.OptimismGoerli: case walletCommon.EthereumGoerli, walletCommon.EthereumSepolia, walletCommon.ArbitrumSepolia, walletCommon.OptimismSepolia:
return "https://testnets-api.opensea.io/v2", nil return "https://testnets-api.opensea.io/v2", nil
} }

View File

@ -22,9 +22,8 @@ const (
optimismMainnetString = "optimism" optimismMainnetString = "optimism"
ethereumGoerliString = "goerli" ethereumGoerliString = "goerli"
ethereumSepoliaString = "sepolia" ethereumSepoliaString = "sepolia"
arbitrumGoerliString = "arbitrum_goerli"
arbitrumSepoliaString = "arbitrum_sepolia" arbitrumSepoliaString = "arbitrum_sepolia"
optimismGoerliString = "optimism_goerli" optimismSepoliaString = "optimism_sepolia"
) )
type urlGetter func(walletCommon.ChainID, string) (string, error) type urlGetter func(walletCommon.ChainID, string) (string, error)
@ -42,12 +41,10 @@ func chainIDToChainString(chainID walletCommon.ChainID) string {
chainString = ethereumGoerliString chainString = ethereumGoerliString
case walletCommon.EthereumSepolia: case walletCommon.EthereumSepolia:
chainString = ethereumSepoliaString chainString = ethereumSepoliaString
case walletCommon.ArbitrumGoerli:
chainString = arbitrumGoerliString
case walletCommon.ArbitrumSepolia: case walletCommon.ArbitrumSepolia:
chainString = arbitrumSepoliaString chainString = arbitrumSepoliaString
case walletCommon.OptimismGoerli: case walletCommon.OptimismSepolia:
chainString = optimismGoerliString chainString = optimismSepoliaString
} }
return chainString return chainString
} }