@@ -20,7 +20,7 @@ import {
2020import { Address , Prisma , ClientPaymentStatus } from '@prisma/client'
2121import xecaddr from 'xecaddrjs'
2222import { getAddressPrefix , satoshisToUnit } from 'utils/index'
23- import { fetchAddressesArray , fetchAllAddressesForNetworkId , getEarliestUnconfirmedTxTimestampForAddress , getLatestConfirmedTxTimestampForAddress , setSyncing , setSyncingBatch , updateLastSynced , updateManyLastSynced , upsertAddress } from './addressService'
23+ import { fetchAddressesArray , fetchAllAddressesForNetworkId , getEarliestUnconfirmedTxTimestampForAddress , getLatestConfirmedTxTimestampForAddress , setSyncing , setSyncingBatch , updateLastSynced , updateManyLastSynced } from './addressService'
2424import * as ws from 'ws'
2525import { BroadcastTxData } from 'ws-service/types'
2626import config from 'config'
@@ -287,23 +287,7 @@ export class ChronikBlockchainClient {
287287 const { amount, opReturn } = await this . getTransactionAmountAndData ( transaction , address . address )
288288 const inputAddresses = this . getSortedInputAddresses ( transaction )
289289 const outputAddresses = this . getSortedOutputAddresses ( transaction )
290-
291- const uniqueAddressStrings = [ ...new Set ( [
292- ...inputAddresses . map ( ( { address : addr } ) => addr ) ,
293- ...outputAddresses . map ( ( { address : addr } ) => addr )
294- ] ) ]
295290 const addressIdMap = new Map < string , string > ( )
296- await Promise . all (
297- uniqueAddressStrings . map ( async ( addrStr ) => {
298- try {
299- const parsed = parseAddress ( addrStr )
300- const addr = await upsertAddress ( parsed )
301- addressIdMap . set ( parsed , addr . id )
302- } catch {
303- // Skip invalid addresses: don't upsert, don't add to map
304- }
305- } )
306- )
307291
308292 const getAddressId = ( addr : string ) : string | undefined => {
309293 try {
0 commit comments