File tree 1 file changed +2
-6
lines changed
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,7 @@ function getRarityWhereStatement(rarities?: Rarity[]): SQLStatement | null {
52
52
}
53
53
54
54
function getFilteredNFTCTE ( nftFilters : GetNFTsFilters , uncapped = false ) : SQLStatement {
55
- const ownerEthereumAddress = nftFilters . owner ? `${ nftFilters . owner . toLocaleLowerCase ( ) } -ETHEREUM` : null
56
- const ownerPolygonAddress = nftFilters . owner ? `${ nftFilters . owner . toLocaleLowerCase ( ) } -POLYGON` : null
57
- const FILTER_BY_OWNER = nftFilters . owner ? SQL ` owner_id = ${ ownerEthereumAddress } OR owner_id = ${ ownerPolygonAddress } ` : null
55
+ const FILTER_BY_OWNER = nftFilters . owner ? SQL ` owner_address = ${ nftFilters . owner } ` : null
58
56
const FILTER_BY_CATEGORY = nftFilters . category ? SQL ` category = ${ nftFilters . category . toLocaleLowerCase ( ) } ` : null
59
57
const FILTER_BY_TOKEN_ID = nftFilters . tokenId ? SQL ` token_id = ${ nftFilters . tokenId } ` : null
60
58
const FILTER_BY_ITEM_ID = nftFilters . itemId ? SQL ` LOWER(item_id) = LOWER(${ nftFilters . itemId } ) ` : null
@@ -411,9 +409,7 @@ function getNFTWhereStatement(nftFilters: GetNFTsFilters): SQLStatement {
411
409
}
412
410
413
411
function getRecentlyListedNFTsQuery ( nftFilters : GetNFTsFilters ) : SQLStatement {
414
- const ownerEthereumAddress = nftFilters . owner ? `${ nftFilters . owner . toLocaleLowerCase ( ) } -ETHEREUM` : null
415
- const ownerPolygonAddress = nftFilters . owner ? `${ nftFilters . owner . toLocaleLowerCase ( ) } -POLYGON` : null
416
- const FILTER_BY_OWNER = nftFilters . owner ? SQL ` owner_id = ${ ownerEthereumAddress } OR owner_id = ${ ownerPolygonAddress } ` : null
412
+ const FILTER_BY_OWNER = nftFilters . owner ? SQL ` owner_address = ${ nftFilters . owner } ` : null
417
413
const FILTER_BY_CATEGORY = nftFilters . category ? SQL ` category = ${ nftFilters . category . toLowerCase ( ) } ` : null
418
414
const FILTER_BY_TOKEN_ID = nftFilters . tokenId ? SQL ` token_id = ${ nftFilters . tokenId } ` : null
419
415
const FILTER_BY_ITEM_ID = nftFilters . itemId ? SQL ` LOWER(item_id) = LOWER(${ nftFilters . itemId } ) ` : null
You can’t perform that action at this time.
0 commit comments