From 12ccff417d95a0aef9736b811ea00341390dd1d5 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Wed, 2 Mar 2022 15:19:40 +0100 Subject: [PATCH] Pass opensea key from env --- VERSION | 2 +- node/status_node_services.go | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 6512d4b8a9f..0b6b6ca07a3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.96.1 \ No newline at end of file +0.96.2 \ No newline at end of file diff --git a/node/status_node_services.go b/node/status_node_services.go index ae18e68cc06..845cdca2cb9 100644 --- a/node/status_node_services.go +++ b/node/status_node_services.go @@ -54,6 +54,8 @@ var ( // ErrRPCClientUnavailable is returned if an RPC client can't be retrieved. // This is a normal situation when a node is stopped. ErrRPCClientUnavailable = errors.New("JSON-RPC client is unavailable") + // OpenseaKeyFromEnv passed from on env var during build time + OpenseaKeyFromEnv string ) func (b *StatusNode) initServices(config *params.NodeConfig) error { @@ -114,7 +116,11 @@ func (b *StatusNode) initServices(config *params.NodeConfig) error { } if config.WalletConfig.Enabled { - walletService := b.walletService(accountsFeed, config.WalletConfig.OpenseaAPIKey) + openseaKey := config.WalletConfig.OpenseaAPIKey + if len(openseaKey) == 0 { + openseaKey = OpenseaKeyFromEnv + } + walletService := b.walletService(accountsFeed, openseaKey) services = append(services, walletService) }