Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(config)_: integrate new rpc providers configs #6178

Merged
merged 20 commits into from
Jan 31, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(test)_: revert unnecessary changes
friofry committed Jan 31, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit d1de5e7be34fd470dd720385e52dd86e05ce3df8
9 changes: 1 addition & 8 deletions rpc/network/db/network_db.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package db

import (
"database/sql"
"fmt"

sq "github.com/Masterminds/squirrel"
@@ -86,22 +85,16 @@ func (n *NetworksPersistence) GetNetworks(onlyEnabled bool, chainID *uint64) ([]
result := make([]*params.Network, 0, 10)
for rows.Next() {
network := &params.Network{}
var relatedChainID sql.NullInt64
err := rows.Scan(
&network.ChainID, &network.ChainName, &network.RPCURL, &network.FallbackURL,
&network.BlockExplorerURL, &network.IconURL, &network.NativeCurrencyName, &network.NativeCurrencySymbol,
&network.NativeCurrencyDecimals, &network.IsTest, &network.Layer, &network.Enabled, &network.ChainColor,
&network.ShortName, &relatedChainID,
&network.ShortName, &network.RelatedChainID,
)
if err != nil {
return nil, err
}

// Convert sql.NullInt64 to uint64 only if it's valid
if relatedChainID.Valid {
network.RelatedChainID = uint64(relatedChainID.Int64)
}

// Fetch RPC providers for the network
providers, err := n.rpcPersistence.GetRpcProviders(network.ChainID)
if err != nil {