Skip to content

Commit 5b34394

Browse files
committed
chore_: kill all third-party requests
1 parent 26ce72e commit 5b34394

File tree

29 files changed

+1882
-2016
lines changed

29 files changed

+1882
-2016
lines changed

api/default_networks.go

Lines changed: 9 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,7 @@ func mainnet(proxyHost, stageName string) params.Network {
5656
const chainName = "ethereum"
5757
const networkName = "mainnet"
5858

59-
rpcProviders := []params.RpcProvider{
60-
// Smart proxy provider
61-
*params.NewEthRpcProxyProvider(chainID, StatusSmartProxy, smartProxyUrl(proxyHost, chainName, networkName), false),
62-
// Proxy providers
63-
*params.NewProxyProvider(chainID, ProxyNodefleet, proxyUrl(stageName, Nodefleet, chainName, networkName), false),
64-
*params.NewProxyProvider(chainID, ProxyInfura, proxyUrl(stageName, Infura, chainName, networkName), false),
65-
*params.NewProxyProvider(chainID, ProxyGrove, proxyUrl(stageName, Grove, chainName, networkName), false),
66-
// Direct providers
67-
*params.NewDirectProvider(chainID, DirectInfura, "https://mainnet.infura.io/v3/", true),
68-
*params.NewDirectProvider(chainID, DirectGrove, "https://eth.rpc.grove.city/v1/", false),
69-
}
59+
rpcProviders := []params.RpcProvider{}
7060

7161
return params.Network{
7262
ChainID: chainID,
@@ -93,17 +83,7 @@ func sepolia(proxyHost, stageName string) params.Network {
9383
const chainName = "ethereum"
9484
const networkName = "sepolia"
9585

96-
rpcProviders := []params.RpcProvider{
97-
// Smart proxy provider
98-
*params.NewEthRpcProxyProvider(chainID, StatusSmartProxy, smartProxyUrl(proxyHost, chainName, networkName), false),
99-
// Proxy providers
100-
*params.NewProxyProvider(chainID, ProxyNodefleet, proxyUrl(stageName, Nodefleet, chainName, networkName), false),
101-
*params.NewProxyProvider(chainID, ProxyInfura, proxyUrl(stageName, Infura, chainName, networkName), false),
102-
*params.NewProxyProvider(chainID, ProxyGrove, proxyUrl(stageName, Grove, chainName, networkName), true),
103-
// Direct providers
104-
*params.NewDirectProvider(chainID, DirectInfura, "https://sepolia.infura.io/v3/", true),
105-
*params.NewDirectProvider(chainID, DirectGrove, "https://eth-sepolia-testnet.rpc.grove.city/v1/", false),
106-
}
86+
rpcProviders := []params.RpcProvider{}
10787

10888
return params.Network{
10989
ChainID: chainID,
@@ -130,17 +110,7 @@ func optimism(proxyHost, stageName string) params.Network {
130110
const chainName = "optimism"
131111
const networkName = "mainnet"
132112

133-
rpcProviders := []params.RpcProvider{
134-
// Smart proxy provider
135-
*params.NewEthRpcProxyProvider(chainID, StatusSmartProxy, smartProxyUrl(proxyHost, chainName, networkName), false),
136-
// Proxy providers
137-
*params.NewProxyProvider(chainID, ProxyNodefleet, proxyUrl(stageName, Nodefleet, chainName, networkName), false),
138-
*params.NewProxyProvider(chainID, ProxyInfura, proxyUrl(stageName, Infura, chainName, networkName), false),
139-
*params.NewProxyProvider(chainID, ProxyGrove, proxyUrl(stageName, Grove, chainName, networkName), true),
140-
// Direct providers
141-
*params.NewDirectProvider(chainID, DirectInfura, "https://optimism-mainnet.infura.io/v3/", true),
142-
*params.NewDirectProvider(chainID, DirectGrove, "https://optimism.rpc.grove.city/v1/", false),
143-
}
113+
rpcProviders := []params.RpcProvider{}
144114

145115
return params.Network{
146116
ChainID: chainID,
@@ -167,17 +137,7 @@ func optimismSepolia(proxyHost, stageName string) params.Network {
167137
const chainName = "optimism"
168138
const networkName = "sepolia"
169139

170-
rpcProviders := []params.RpcProvider{
171-
// Smart proxy provider
172-
*params.NewEthRpcProxyProvider(chainID, StatusSmartProxy, smartProxyUrl(proxyHost, chainName, networkName), false),
173-
// Proxy providers
174-
*params.NewProxyProvider(chainID, ProxyNodefleet, proxyUrl(stageName, Nodefleet, chainName, networkName), false),
175-
*params.NewProxyProvider(chainID, ProxyInfura, proxyUrl(stageName, Infura, chainName, networkName), false),
176-
*params.NewProxyProvider(chainID, ProxyGrove, proxyUrl(stageName, Grove, chainName, networkName), true),
177-
// Direct providers
178-
*params.NewDirectProvider(chainID, DirectInfura, "https://optimism-sepolia.infura.io/v3/", true),
179-
*params.NewDirectProvider(chainID, DirectGrove, "https://optimism-sepolia-testnet.rpc.grove.city/v1/", false),
180-
}
140+
rpcProviders := []params.RpcProvider{}
181141

182142
return params.Network{
183143
ChainID: chainID,
@@ -204,17 +164,7 @@ func arbitrum(proxyHost, stageName string) params.Network {
204164
const chainName = "arbitrum"
205165
const networkName = "mainnet"
206166

207-
rpcProviders := []params.RpcProvider{
208-
// Smart proxy provider
209-
*params.NewEthRpcProxyProvider(chainID, StatusSmartProxy, smartProxyUrl(proxyHost, chainName, networkName), false),
210-
// Proxy providers
211-
*params.NewProxyProvider(chainID, ProxyNodefleet, proxyUrl(stageName, Nodefleet, chainName, networkName), false),
212-
*params.NewProxyProvider(chainID, ProxyInfura, proxyUrl(stageName, Infura, chainName, networkName), false),
213-
*params.NewProxyProvider(chainID, ProxyGrove, proxyUrl(stageName, Grove, chainName, networkName), true),
214-
// Direct providers
215-
*params.NewDirectProvider(chainID, DirectInfura, "https://arbitrum-mainnet.infura.io/v3/", true),
216-
*params.NewDirectProvider(chainID, DirectGrove, "https://arbitrum-one.rpc.grove.city/v1/", false),
217-
}
167+
rpcProviders := []params.RpcProvider{}
218168

219169
return params.Network{
220170
ChainID: chainID,
@@ -241,17 +191,7 @@ func arbitrumSepolia(proxyHost, stageName string) params.Network {
241191
const chainName = "arbitrum"
242192
const networkName = "sepolia"
243193

244-
rpcProviders := []params.RpcProvider{
245-
// Smart proxy provider
246-
*params.NewEthRpcProxyProvider(chainID, StatusSmartProxy, smartProxyUrl(proxyHost, chainName, networkName), false),
247-
// Proxy providers
248-
*params.NewProxyProvider(chainID, ProxyNodefleet, proxyUrl(stageName, Nodefleet, chainName, networkName), false),
249-
*params.NewProxyProvider(chainID, ProxyInfura, proxyUrl(stageName, Infura, chainName, networkName), false),
250-
*params.NewProxyProvider(chainID, ProxyGrove, proxyUrl(stageName, Grove, chainName, networkName), true),
251-
// Direct providers
252-
*params.NewDirectProvider(chainID, DirectInfura, "https://arbitrum-sepolia.infura.io/v3/", true),
253-
*params.NewDirectProvider(chainID, DirectGrove, "https://arbitrum-sepolia-testnet.rpc.grove.city/v1/", false),
254-
}
194+
rpcProviders := []params.RpcProvider{}
255195

256196
return params.Network{
257197
ChainID: chainID,
@@ -278,17 +218,7 @@ func base(proxyHost, stageName string) params.Network {
278218
const chainName = "base"
279219
const networkName = "mainnet"
280220

281-
rpcProviders := []params.RpcProvider{
282-
// Smart proxy provider
283-
*params.NewEthRpcProxyProvider(chainID, StatusSmartProxy, smartProxyUrl(proxyHost, chainName, networkName), false),
284-
// Proxy providers
285-
*params.NewProxyProvider(chainID, ProxyNodefleet, proxyUrl(stageName, Nodefleet, chainName, networkName), false),
286-
*params.NewProxyProvider(chainID, ProxyInfura, proxyUrl(stageName, Infura, chainName, networkName), false),
287-
*params.NewProxyProvider(chainID, ProxyGrove, proxyUrl(stageName, Grove, chainName, networkName), true),
288-
// Direct providers
289-
*params.NewDirectProvider(chainID, DirectInfura, "https://base-mainnet.infura.io/v3/", true),
290-
*params.NewDirectProvider(chainID, DirectGrove, "https://base.rpc.grove.city/v1/", false),
291-
}
221+
rpcProviders := []params.RpcProvider{}
292222

293223
return params.Network{
294224
ChainID: chainID,
@@ -315,17 +245,7 @@ func baseSepolia(proxyHost, stageName string) params.Network {
315245
const chainName = "base"
316246
const networkName = "sepolia"
317247

318-
rpcProviders := []params.RpcProvider{
319-
// Smart proxy provider
320-
*params.NewEthRpcProxyProvider(chainID, StatusSmartProxy, smartProxyUrl(proxyHost, chainName, networkName), false),
321-
// Proxy providers
322-
*params.NewProxyProvider(chainID, ProxyNodefleet, proxyUrl(stageName, Nodefleet, chainName, networkName), false),
323-
*params.NewProxyProvider(chainID, ProxyInfura, proxyUrl(stageName, Infura, chainName, networkName), false),
324-
*params.NewProxyProvider(chainID, ProxyGrove, proxyUrl(stageName, Grove, chainName, networkName), true),
325-
// Direct providers
326-
*params.NewDirectProvider(chainID, DirectInfura, "https://base-sepolia.infura.io/v3/", true),
327-
*params.NewDirectProvider(chainID, DirectGrove, "https://base-testnet.rpc.grove.city/v1/", false),
328-
}
248+
rpcProviders := []params.RpcProvider{}
329249

330250
return params.Network{
331251
ChainID: chainID,
@@ -352,12 +272,7 @@ func statusNetworkSepolia(proxyHost string) params.Network {
352272
const chainName = "status"
353273
const networkName = "sepolia"
354274

355-
rpcProviders := []params.RpcProvider{
356-
// Smart proxy provider
357-
*params.NewEthRpcProxyProvider(chainID, StatusSmartProxy, smartProxyUrl(proxyHost, chainName, networkName), false),
358-
// Direct providers
359-
*params.NewDirectProvider(chainID, DirectStatus, "https://public.sepolia.rpc.status.network", false),
360-
}
275+
rpcProviders := []params.RpcProvider{}
361276

362277
return params.Network{
363278
ChainID: chainID,

centralizedmetrics/providers/appsflyer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/status-im/status-go/centralizedmetrics/common"
1515
)
1616

17-
const AppsflyerBaseURL = "https://api3.appsflyer.com"
17+
const AppsflyerBaseURL = "https://dummy.com"
1818

1919
var AppsflyerAppID = ""
2020
var AppsflyerToken = ""

centralizedmetrics/providers/mixpanel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/status-im/status-go/centralizedmetrics/common"
1414
)
1515

16-
const MixpanelBaseURL = "https://api.mixpanel.com"
16+
const MixpanelBaseURL = "https://dummy.com"
1717

1818
var MixpanelToken = ""
1919
var MixpanelAppID = ""

params/defaults.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ const (
5858

5959
// MainnetEthereumNetworkURL is URL where the upstream ethereum network is loaded to
6060
// allow us avoid syncing node.
61-
MainnetEthereumNetworkURL = "https://mainnet.infura.io/nKmXgiFgc2KqtoQ8BCGJ"
61+
MainnetEthereumNetworkURL = "https://dummy.com/"
6262

6363
// SepoliaEthereumNetworkURL is an open RPC endpoint to Sepolia network
64-
SepoliaEthereumNetworkURL = "https://sepolia.etherscan.io/"
64+
SepoliaEthereumNetworkURL = "https://dummy.com/"
6565

6666
// MainNetworkID is id of the main network
6767
MainNetworkID = 1
@@ -82,7 +82,7 @@ const (
8282
LESDiscoveryIdentifier = "LES2@"
8383

8484
// IpfsGatewayURL is the Gateway URL to use for IPFS
85-
IpfsGatewayURL = "https://ipfs.status.im/"
85+
IpfsGatewayURL = "https://dummy.com/"
8686

8787
DefaultPreLoginLogFile = "pre_login.log"
8888
DefaultPreLoginLogLevel = "ERROR"

protocol/linkpreview_unfurler_opengraph.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ func (u *OpenGraphUnfurler) Unfurl() (*common.LinkPreview, error) {
8181
preview := newDefaultLinkPreview(u.url)
8282
preview.Type = protobuf.UnfurledLink_LINK
8383

84+
return preview, fmt.Errorf("failed to parse OpenGraph data")
8485
headers := map[string]string{
8586
"accept": headerAcceptText,
8687
"accept-language": headerAcceptLanguage,

protocol/messenger_linkpreview.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (m *Messenger) newURLUnfurler(httpClient *http.Client, url *neturl.URL) Unf
6666
switch normalizeHostname(url.Hostname()) {
6767
case "reddit.com":
6868
return NewOEmbedUnfurler(
69-
"https://www.reddit.com/oembed",
69+
"https://dummy.com/oembed",
7070
url,
7171
m.logger,
7272
httpClient)

protocol/pushnotificationserver/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
)
2020

2121
const encryptedPayloadKeyLength = 16
22-
const defaultGorushURL = "https://gorush.infra.status.im/"
22+
const defaultGorushURL = "https://dummy.com/"
2323

2424
var errUnhandledPushNotificationType = errors.New("unhandled push notification type")
2525

services/gif/gif.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var tenorAPIKey = ""
3131
var defaultParams = "&media_filter=minimal&limit=50&key="
3232

3333
const maxRetry = 3
34-
const baseURL = "https://g.tenor.com/v1/"
34+
const baseURL = "https://dummy.com/"
3535

3636
func NewGifAPI(db *accounts.Database) *API {
3737
return &API{db}

services/wallet/onramp/provider_mercuryo.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
)
1919

2020
const mercuryoID = "mercuryo"
21-
const mercuryioNoFeesBaseURL = "https://exchange.mercuryo.io/?type=buy&networks=ETHEREUM,ARBITRUM,OPTIMISM,BASE&currency=ETH"
21+
const mercuryioNoFeesBaseURL = "https://dummy.com"
2222
const supportedAssetsUpdateInterval = 24 * time.Hour
2323

2424
type MercuryoProvider struct {
@@ -118,7 +118,7 @@ func getMercuryoCurrency(symbol string) string {
118118

119119
func (p *MercuryoProvider) GetURL(ctx context.Context, parameters Parameters) (string, error) {
120120
const (
121-
baseURL = "https://exchange.mercuryo.io/?type=buy"
121+
baseURL = "https://dummy.com"
122122
widgetID = "6a7eb330-2b09-49b7-8fd3-1c77cfb6cd47"
123123
widgetSecret = "AZ5fmxmrgyrXH3zre6yHU2Vw9fPqEw82" // #nosec G101
124124
)

services/wallet/onramp/provider_moonpay.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
const moonpayID = "moonpay"
11-
const moonpayURL = "https://buy.moonpay.com/?apiKey=pk_live_YQC6CQPA5qqDu0unEwHJyAYQyeIqFGR"
11+
const moonpayURL = "https://dummy.com"
1212

1313
type MoonPayProvider struct{}
1414

services/wallet/onramp/provider_ramp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
const rampID = "ramp"
11-
const rampSiteURL = "https://app.ramp.network/?hostApiKey=zrtf9u2uqebeyzcs37fu5857tktr3eg9w5tffove&hostAppName=Status&swapAsset=ETH_*,ARBITRUM_*,OPTIMISM_*,BASE_*"
11+
const rampSiteURL = "https://dummy.com"
1212

1313
type RampProvider struct{}
1414

services/wallet/router/pathprocessor/processor_bridge_celar.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ import (
3434
)
3535

3636
const (
37-
baseURL = "https://cbridge-prod2.celer.app"
38-
testBaseURL = "https://cbridge-v2-test.celer.network"
37+
baseURL = "https://dummy.com"
38+
testBaseURL = "https://dummy.com"
3939

4040
maxSlippage = uint32(1000)
4141
)

services/wallet/router/pathprocessor/processor_bridge_hop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ func (h *HopBridgeProcessor) CalculateFees(params ProcessorInputParams) (*big.In
497497
reqParams.Add("toChain", toChainName)
498498
reqParams.Add("slippage", "0.5") // menas 0.5%
499499

500-
url := "https://api.hop.exchange/v1/quote"
500+
url := "https://dummy.com"
501501
response, err := h.httpClient.DoGetRequest(context.Background(), url, reqParams)
502502
if err != nil {
503503
return nil, nil, err

services/wallet/service.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"database/sql"
66
"encoding/json"
7-
"fmt"
87
"sync"
98
"time"
109

@@ -136,13 +135,7 @@ func NewService(
136135

137136
cryptoCompare := cryptocompare.NewClient()
138137
coingecko := coingecko.NewClient()
139-
cryptoCompareProxy := cryptocompare.NewClientWithParams(cryptocompare.Params{
140-
ID: fmt.Sprintf("%s-proxy", cryptoCompare.ID()),
141-
URL: fmt.Sprintf("https://%s.api.status.im/cryptocompare/", statusProxyStageName),
142-
User: config.WalletConfig.StatusProxyMarketUser,
143-
Password: config.WalletConfig.StatusProxyMarketPassword,
144-
})
145-
marketManager := market.NewManager([]thirdparty.MarketDataProvider{cryptoCompare, coingecko, cryptoCompareProxy}, feed)
138+
marketManager := market.NewManager([]thirdparty.MarketDataProvider{cryptoCompare, coingecko}, feed)
146139
reader := NewReader(tokenManager, marketManager, token.NewPersistence(db), feed)
147140
history := history.NewService(db, accountsDB, accountFeed, feed, rpcClient, tokenManager, marketManager, balanceCacher.Cache())
148141
currency := currency.NewService(db, feed, tokenManager, marketManager)

services/wallet/thirdparty/collectibles/alchemy/client.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,6 @@ const nftMetadataBatchLimit = 100
2525
const contractMetadataBatchLimit = 100
2626

2727
func getBaseURL(chainID walletCommon.ChainID) (string, error) {
28-
switch uint64(chainID) {
29-
case walletCommon.EthereumMainnet:
30-
return "https://eth-mainnet.g.alchemy.com", nil
31-
case walletCommon.EthereumSepolia:
32-
return "https://eth-sepolia.g.alchemy.com", nil
33-
case walletCommon.OptimismMainnet:
34-
return "https://opt-mainnet.g.alchemy.com", nil
35-
case walletCommon.OptimismSepolia:
36-
return "https://opt-sepolia.g.alchemy.com", nil
37-
case walletCommon.ArbitrumMainnet:
38-
return "https://arb-mainnet.g.alchemy.com", nil
39-
case walletCommon.ArbitrumSepolia:
40-
return "https://arb-sepolia.g.alchemy.com", nil
41-
case walletCommon.BaseMainnet:
42-
return "https://base-mainnet.g.alchemy.com", nil
43-
case walletCommon.BaseSepolia:
44-
return "https://base-sepolia.g.alchemy.com", nil
45-
}
46-
4728
return "", thirdparty.ErrChainIDNotSupported
4829
}
4930

services/wallet/thirdparty/collectibles/opensea/client_v2.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ import (
1919
const assetLimitV2 = 50
2020

2121
func getV2BaseURL(chainID walletCommon.ChainID) (string, error) {
22-
switch uint64(chainID) {
23-
case walletCommon.EthereumMainnet, walletCommon.ArbitrumMainnet, walletCommon.OptimismMainnet, walletCommon.BaseMainnet:
24-
return "https://api.opensea.io/v2", nil
25-
case walletCommon.EthereumSepolia, walletCommon.ArbitrumSepolia, walletCommon.OptimismSepolia, walletCommon.BaseSepolia:
26-
return "https://testnets-api.opensea.io/v2", nil
27-
}
28-
2922
return "", thirdparty.ErrChainIDNotSupported
3023
}
3124

services/wallet/thirdparty/collectibles/rarible/client.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@ func (o *Client) IsConnected() bool {
4242
}
4343

4444
func getBaseURL(chainID walletCommon.ChainID) (string, error) {
45-
switch uint64(chainID) {
46-
case walletCommon.EthereumMainnet, walletCommon.ArbitrumMainnet, walletCommon.BaseMainnet:
47-
return "https://api.rarible.org", nil
48-
case walletCommon.EthereumSepolia, walletCommon.ArbitrumSepolia, walletCommon.BaseSepolia:
49-
return "https://testnet-api.rarible.org", nil
50-
}
51-
5245
return "", thirdparty.ErrChainIDNotSupported
5346
}
5447

services/wallet/thirdparty/decoder/fourbyte/client.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,11 @@ type Client struct {
3737
}
3838

3939
func NewClient() *Client {
40-
return &Client{Client: &http.Client{Timeout: time.Minute}, URL: "https://www.4byte.directory"}
40+
return &Client{Client: &http.Client{Timeout: time.Minute}, URL: "https://www.dummy.com"}
4141
}
4242

4343
func (c *Client) DoQuery(url string) (*http.Response, error) {
44-
resp, err := c.Client.Get(url)
45-
46-
if err != nil {
47-
return nil, err
48-
}
49-
return resp, nil
44+
return nil, thirdparty.ErrEndpointNotSupported
5045
}
5146

5247
func (c *Client) Run(data string) (*thirdparty.DataParsed, error) {

0 commit comments

Comments
 (0)