Skip to content

Commit

Permalink
Merge pull request #196 from NetSepio/NftSubscription
Browse files Browse the repository at this point in the history
add infura project id
  • Loading branch information
Rushikeshnimkar authored Aug 17, 2024
2 parents 290321b + 85b34bd commit e47b317
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/v1/nftcontract/nftcontract.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func getnftcontractinfo(c *gin.Context) {

// Check if user has a domain
var domain models.Domain
if err := db.Where("id = ?", userId).First(&domain).Error; err != nil {
if err := db.Where("created_by_id = ?", userId).First(&domain).Error; err != nil {
if err == gorm.ErrRecordNotFound {
httpo.NewErrorResponse(403, "User has not created a domain yet").SendD(c)
} else {
Expand Down Expand Up @@ -84,7 +84,7 @@ func getnftcontractinfo(c *gin.Context) {
}

// Connect to Ethereum mainnet
client, err := ethclient.Dial("https://mainnet.infura.io/v3/YOUR_INFURA_PROJECT_ID")
client, err := ethclient.Dial("https://mainnet.infura.io/v3/03532a98837749c0b262f9c5ac5fd8f1")
if err != nil {
logwrapper.Error("Failed to connect to the Ethereum client", err)
httpo.NewErrorResponse(500, "Failed to connect to the Ethereum network").SendD(c)
Expand Down

0 comments on commit e47b317

Please sign in to comment.