diff --git a/src/subcommand/server.rs b/src/subcommand/server.rs
index 8c68e29d11..a693d87d9c 100644
--- a/src/subcommand/server.rs
+++ b/src/subcommand/server.rs
@@ -1258,7 +1258,16 @@ mod tests {
TestServer::new().assert_response_regex(
"/sat/0",
StatusCode::OK,
- ".*
0°0′0″0‴.*Sat 0
.*",
+ ".*Sat 0.*Sat 0
.*",
+ );
+ }
+
+ #[test]
+ fn block() {
+ TestServer::new().assert_response_regex(
+ "/block/0",
+ StatusCode::OK,
+ ".*Block 0.*Block 0
.*",
);
}
@@ -1886,6 +1895,26 @@ mod tests {
);
}
+ #[test]
+ fn inscription_page_title() {
+ let server = TestServer::new_with_sat_index();
+ server.mine_blocks(1);
+
+ let txid = server.bitcoin_rpc_server.broadcast_tx(TransactionTemplate {
+ inputs: &[(1, 0, 0)],
+ witness: inscription("text/foo", "hello").to_witness(),
+ ..Default::default()
+ });
+
+ server.mine_blocks(1);
+
+ server.assert_response_regex(
+ format!("/inscription/{}", InscriptionId::from(txid)),
+ StatusCode::OK,
+ ".*Inscription 0.*",
+ );
+ }
+
#[test]
fn inscription_page_has_sat_when_sats_are_tracked() {
let server = TestServer::new_with_sat_index();
diff --git a/src/templates/block.rs b/src/templates/block.rs
index 616abe8433..f86ac7675d 100644
--- a/src/templates/block.rs
+++ b/src/templates/block.rs
@@ -25,7 +25,7 @@ impl BlockHtml {
impl PageContent for BlockHtml {
fn title(&self) -> String {
- format!("Block {}", self.hash)
+ format!("Block {}", self.height)
}
}
diff --git a/src/templates/inscription.rs b/src/templates/inscription.rs
index bf4098133f..c9d9188b51 100644
--- a/src/templates/inscription.rs
+++ b/src/templates/inscription.rs
@@ -17,7 +17,7 @@ pub(crate) struct InscriptionHtml {
impl PageContent for InscriptionHtml {
fn title(&self) -> String {
- format!("Inscription {}", self.inscription_id)
+ format!("Inscription {}", self.number)
}
fn preview_image_url(&self) -> Option> {
diff --git a/src/templates/sat.rs b/src/templates/sat.rs
index 6bc8f4143c..c05688b9b5 100644
--- a/src/templates/sat.rs
+++ b/src/templates/sat.rs
@@ -10,7 +10,7 @@ pub(crate) struct SatHtml {
impl PageContent for SatHtml {
fn title(&self) -> String {
- self.sat.degree().to_string()
+ format!("Sat {}", self.sat)
}
}