diff --git a/server/marketserver/api/v1/market/marketsecondary.go b/server/marketserver/api/v1/market/marketsecondary.go index 78a29a8c..55faaa36 100644 --- a/server/marketserver/api/v1/market/marketsecondary.go +++ b/server/marketserver/api/v1/market/marketsecondary.go @@ -43,11 +43,17 @@ func (this *MarketApi) LockList(c *gin.Context) { pageSize := q5.AdjustRangeValue(q5.SafeToInt32(reqJson.PageSize), 1, 20) cursor := q5.SafeToInt64(reqJson.Cursor) - nftLockMeta := mt.Table.Contract.GetByNetIdName(int32(netId), jccommon.CONTRACT_NAME_NFTLock) + lockAddress := "" + { + nftLockMeta := mt.Table.Contract.GetByNetIdName(int32(netId), jccommon.CONTRACT_NAME_NFTLock) + if nftLockMeta == nil { + lockAddress = strings.ToLower(nftLockMeta.GetAddress()) + } + } sql := fmt.Sprintf(` SELECT * FROM t_nft WHERE idx > %d AND net_id = %d AND owner_address = '%s' AND token_type IN (%d, %d, %d) AND last_lock_address = ? `, - cursor, netId, strings.ToLower(nftLockMeta.GetAddress()), + cursor, netId, strings.ToLower(lockAddress), jccommon.NFT_TYPE_CFHERO, jccommon.NFT_TYPE_CFHERO_NORMAL, jccommon.NFT_TYPE_GOLD_BULLION) params := []string{owner}