Skip to content

Commit 7e8a578

Browse files
committed
fix: skip get previous tx when cellbase in indexer
1 parent 41600ea commit 7e8a578

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • packages/neuron-wallet/src/services/indexer

packages/neuron-wallet/src/services/indexer/queue.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ export default class IndexerQueue {
4848

4949
private url: string
5050

51+
private emptyTxHash = '0x' + '0'.repeat(64)
52+
5153
constructor(url: string, lockHashInfos: LockHashInfo[], tipNumberSubject: Subject<string | undefined>) {
5254
this.lockHashInfos = lockHashInfos
5355
this.url = url
@@ -213,6 +215,9 @@ export default class IndexerQueue {
213215
if (!txEntity || !txEntity.blockHash) {
214216
if (!txEntity) {
215217
for (const input of transaction.inputs!) {
218+
if (input.previousOutput!.txHash === this.emptyTxHash) {
219+
continue
220+
}
216221
const previousTxWithStatus = await this.getBlocksService.getTransaction(input.previousOutput!.txHash)
217222
const previousTx = TypeConvert.toTransaction(previousTxWithStatus.transaction)
218223
const previousOutput = previousTx.outputs![+input.previousOutput!.index]

0 commit comments

Comments
 (0)