diff --git a/src/subcommand/server/brc20/receipt.rs b/src/subcommand/server/brc20/receipt.rs index 1b0a0528fc..05bf0f2c8b 100644 --- a/src/subcommand/server/brc20/receipt.rs +++ b/src/subcommand/server/brc20/receipt.rs @@ -382,6 +382,7 @@ pub(crate) async fn brc20_block_events( txid: txid.to_string(), events: events.into_iter().map(|e| e.into()).collect(), }) + .filter(|e| !e.events.is_empty()) .collect(), }))) } diff --git a/src/subcommand/server/ord/transaction.rs b/src/subcommand/server/ord/transaction.rs index dcab8008fb..2eee3bcd76 100644 --- a/src/subcommand/server/ord/transaction.rs +++ b/src/subcommand/server/ord/transaction.rs @@ -202,10 +202,12 @@ pub(crate) async fn ord_block_inscriptions( )?; api_tx_operations.push(tx_inscription); } - api_block_operations.push(ApiTxInscriptions { - inscriptions: api_tx_operations, - txid: txid.to_string(), - }); + if !api_tx_operations.is_empty() { + api_block_operations.push(ApiTxInscriptions { + inscriptions: api_tx_operations, + txid: txid.to_string(), + }); + } } Ok(Json(ApiResponse::ok(ApiBlockInscriptions {