Skip to content

Commit 4d7cb1d

Browse files
sczemborvuvoth
andauthored
Update packages/btcindexer/src/btcindexer.ts
Co-authored-by: vuvoth <vu.voth@gmail.com> Signed-off-by: sczembor <43810037+sczembor@users.noreply.github.com>
1 parent 4e3f5b1 commit 4d7cb1d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/btcindexer/src/btcindexer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ export class Indexer {
142142
const latestBlock = await this.d1
143143
.prepare("SELECT MAX(height) as latest_height FROM processed_blocks")
144144
.first<{ latest_height: number }>();
145-
const latestHeight = latestBlock?.latest_height;
146-
147-
if (!latestHeight) {
145+
146+
if (!latestBlock) {
148147
return;
149148
}
150149

150+
const latestHeight = latestBlock.latest_height;
151151
const pendingTxs = await this.d1
152152
.prepare(
153153
"SELECT tx_id, block_hash, block_height FROM nbtc_txs WHERE status = 'confirming'",

0 commit comments

Comments
 (0)