Skip to content

Commit

Permalink
Merge pull request #25 from bnb-chain/fix-type
Browse files Browse the repository at this point in the history
fix: modify type to Object default
  • Loading branch information
cosinlink authored May 17, 2024
2 parents 99274cf + c3218cf commit 666a92e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions monitor/gnfd_block_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,21 +234,21 @@ func (p *GnfdBlockProcessor) handleEventCreateGroup(blockHeight uint64, event ab

listing, err := p.listingDao.GetByGroupId(context.Background(), int64(createGroup.GroupId.Uint64()))
if err == nil && listing.Id > 0 {
return fmt.Sprintf("insert into items (category_id, group_id, group_name, name, owner_address, status, description, url, listed_at, created_gnfd_height, price)"+
" values (%d, %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, %s)",
return fmt.Sprintf("insert into items (category_id, group_id, group_name, name, owner_address, status, description, url, listed_at, created_gnfd_height, price, `type`)"+
" values (%d, %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, %s, %d)",
categoryId, createGroup.GroupId.Uint64(), createGroup.GroupName, resourceName, createGroup.Owner,
database.ItemListed, escape(extra.Desc), escape(extra.Url), block.Time.Unix(), blockHeight, listing.Price), nil
database.ItemListed, escape(extra.Desc), escape(extra.Url), block.Time.Unix(), blockHeight, listing.Price, database.OBJECT), nil
}

if err != nil {
util.Logger.Errorf("processor: %s, fail to get listing err: %s", p.Name(), err)
return rawSql, err
}

return fmt.Sprintf("insert into items (category_id, group_id, group_name, name, owner_address, status, description, url, listed_at, created_gnfd_height)"+
" values (%d, %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d)",
return fmt.Sprintf("insert into items (category_id, group_id, group_name, name, owner_address, status, description, url, listed_at, created_gnfd_height, `type`)"+
" values (%d, %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, %d)",
categoryId, createGroup.GroupId.Uint64(), createGroup.GroupName, resourceName, createGroup.Owner,
database.ItemPending, escape(extra.Desc), escape(extra.Url), block.Time.Unix(), blockHeight), nil
database.ItemPending, escape(extra.Desc), escape(extra.Url), block.Time.Unix(), blockHeight, database.OBJECT), nil
}

func (p *GnfdBlockProcessor) getCategoryId(extra *Extra) int64 {
Expand Down

0 comments on commit 666a92e

Please sign in to comment.