Skip to content

Commit

Permalink
Fix gateway api key passing
Browse files Browse the repository at this point in the history
  • Loading branch information
kirugan committed Jan 18, 2024
1 parent ff91487 commit bef4369
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ func New(cfg *Config, version string) (*Node, error) { //nolint:gocyclo,funlen
}

feederClientTimeout := 5 * time.Second
client := feeder.NewClient(cfg.Network.FeederURL()).WithUserAgent(ua).WithLogger(log).WithTimeout(feederClientTimeout)
client := feeder.NewClient(cfg.Network.FeederURL()).WithUserAgent(ua).WithLogger(log).
WithTimeout(feederClientTimeout).WithAPIKey(cfg.GatewayAPIKey)
synchronizer := sync.New(chain, adaptfeeder.New(client), log, cfg.PendingPollInterval, dbIsRemote)
gatewayClient := gateway.NewClient(cfg.Network.GatewayURL(), log).WithUserAgent(ua)
gatewayClient := gateway.NewClient(cfg.Network.GatewayURL(), log).WithUserAgent(ua).WithAPIKey(cfg.GatewayAPIKey)

if cfg.P2P {
if !cfg.P2PBootNode {
Expand Down

0 comments on commit bef4369

Please sign in to comment.