@@ -3825,15 +3825,14 @@ export class PgStore extends BasePgStore {
3825
3825
3826
3826
async getNamesByAddressList ( {
3827
3827
address,
3828
- includeUnanchored,
3829
3828
chainId,
3830
3829
} : {
3831
3830
address : string ;
3832
3831
includeUnanchored : boolean ;
3833
3832
chainId : ChainID ;
3834
3833
} ) : Promise < FoundOrNot < string [ ] > > {
3835
3834
const queryResult = await this . sqlTransaction ( async sql => {
3836
- const maxBlockHeight = await this . getMaxBlockHeight ( sql , { includeUnanchored } ) ;
3835
+ const maxBlockHeight = await this . getMaxBlockHeight ( sql , { includeUnanchored : false } ) ;
3837
3836
// 1. Get subdomains owned by this address. These don't produce NFT events so we have to look
3838
3837
// directly at the `subdomains` table.
3839
3838
const subdomainsQuery = await sql < { name : string ; fully_qualified_subdomain : string } [ ] > `
@@ -3886,7 +3885,7 @@ export class PgStore extends BasePgStore {
3886
3885
const nameCVs = importedNamesQuery . map ( i => bnsNameCV ( i . name ) ) ;
3887
3886
const oldImportedNamesQuery = await sql < { value : string } [ ] > `
3888
3887
SELECT value
3889
- FROM ${ includeUnanchored ? sql `nft_custody_unanchored` : sql ` nft_custody` }
3888
+ FROM nft_custody
3890
3889
WHERE recipient <> ${ address } AND value IN ${ sql ( nameCVs ) }
3891
3890
` ;
3892
3891
oldImportedNames = oldImportedNamesQuery . map ( i => bnsHexValueToName ( i . value ) ) ;
@@ -3897,7 +3896,7 @@ export class PgStore extends BasePgStore {
3897
3896
// 3. Get newer NFT names owned by this address.
3898
3897
const nftNamesQuery = await sql < { value : string } [ ] > `
3899
3898
SELECT value
3900
- FROM ${ includeUnanchored ? sql `nft_custody_unanchored` : sql ` nft_custody` }
3899
+ FROM nft_custody
3901
3900
WHERE recipient = ${ address } AND asset_identifier = ${ getBnsSmartContractId ( chainId ) }
3902
3901
` ;
3903
3902
namesToValidate . push ( ...nftNamesQuery . map ( i => bnsHexValueToName ( i . value ) ) ) ;
0 commit comments