@@ -11,6 +11,7 @@ import TransactionPersistor from 'services/tx/transaction-persistor'
1111import IndexerTransaction from 'services/tx/indexer-transaction'
1212
1313import IndexerRPC from './indexer-rpc'
14+ import HexUtils from 'utils/hex'
1415
1516export interface LockHashInfo {
1617 lockHash : string
@@ -137,7 +138,7 @@ export default class IndexerQueue {
137138 const lockHashIndexStates = await this . indexerRPC . getLockHashIndexStates ( )
138139 const blockNumbers = lockHashIndexStates
139140 . filter ( state => lockHashes . includes ( state . lockHash ) )
140- . map ( state => state . blockNumber )
141+ . map ( state => HexUtils . toDecimal ( state . blockNumber ) )
141142 const uniqueBlockNumbers = [ ...new Set ( blockNumbers ) ]
142143 const blockNumbersBigInt = uniqueBlockNumbers . map ( num => BigInt ( num ) )
143144 const minBlockNumber = Utils . min ( blockNumbersBigInt )
@@ -192,9 +193,9 @@ export default class IndexerQueue {
192193
193194 let address : string | undefined
194195 if ( type === TxPointType . CreatedBy ) {
195- address = LockUtils . lockScriptToAddress ( transaction . outputs ! [ + txPoint . index ] . lock )
196+ address = LockUtils . lockScriptToAddress ( transaction . outputs ! [ parseInt ( txPoint . index , 16 ) ] . lock )
196197 } else if ( type === TxPointType . ConsumedBy ) {
197- const input = txEntity . inputs [ + txPoint . index ]
198+ const input = txEntity . inputs [ parseInt ( txPoint . index , 16 ) ]
198199 const output = await IndexerTransaction . updateInputLockHash ( input . outPointTxHash ! , input . outPointIndex ! )
199200 if ( output ) {
200201 address = LockUtils . lockScriptToAddress ( output . lock )
0 commit comments