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) {
case walletCommon.EthereumMainnet, walletCommon.ArbitrumMainnet, walletCommon.OptimismMainnet:
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
}

View File

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