Skip to content

Commit

Permalink
Pass opensea key from env
Browse files Browse the repository at this point in the history
  • Loading branch information
rasom authored and flexsurfer committed Mar 21, 2022
1 parent 8692625 commit 12ccff4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.96.1
0.96.2
8 changes: 7 additions & 1 deletion node/status_node_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit 12ccff4

Please sign in to comment.