Skip to content

Commit

Permalink
nil reference panic
Browse files Browse the repository at this point in the history
  • Loading branch information
benny-conn committed Aug 21, 2023
1 parent 2557a0a commit 6446eb2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions indexer/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ func updateMetadataForContract(c context.Context, input UpdateContractMetadataIn
if err != nil {
return err
}
if newMetadata == nil {
newMetadata = new(rpc.TokenContractMetadata)
}
newMetadata.Name = util.FirstNonEmptyString(alchMetadata.Name, alchMetadata.OpenseaCollection.CollectionName)
newMetadata.Symbol = util.FirstNonEmptyString(alchMetadata.Symbol, newMetadata.Symbol)
}
Expand Down

0 comments on commit 6446eb2

Please sign in to comment.