From 250b8eea8714ca797bda3bb85f92791e7296b816 Mon Sep 17 00:00:00 2001 From: Dario Gabriel Lipicar Date: Thu, 11 Jan 2024 13:50:14 -0300 Subject: [PATCH] fix: update the list of chains supported by opensea --- services/wallet/thirdparty/opensea/client_v2.go | 2 +- services/wallet/thirdparty/opensea/types_v2.go | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/services/wallet/thirdparty/opensea/client_v2.go b/services/wallet/thirdparty/opensea/client_v2.go index 7dd408531..a42e78314 100644 --- a/services/wallet/thirdparty/opensea/client_v2.go +++ b/services/wallet/thirdparty/opensea/client_v2.go @@ -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 } diff --git a/services/wallet/thirdparty/opensea/types_v2.go b/services/wallet/thirdparty/opensea/types_v2.go index d6adba523..baa856b5e 100644 --- a/services/wallet/thirdparty/opensea/types_v2.go +++ b/services/wallet/thirdparty/opensea/types_v2.go @@ -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 }