Skip to content

Commit

Permalink
Add sat name to inscription page (#3826)
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptoni9n committed Jun 27, 2024
1 parent d014a06 commit ce507bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/subcommand/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4801,7 +4801,7 @@ mod tests {
server.assert_response_regex(
format!("/inscription/{}", InscriptionId { txid, index: 0 }),
StatusCode::OK,
r".*<dt>sat</dt>\s*<dd><a href=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/sat/5000000000>5000000000</a></dd>\s*<dt>preview</dt>.*",
r".*<dt>sat</dt>\s*<dd><a href=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/sat/5000000000>5000000000</a></dd>\s*<dt>sat name</dt>\s*<dd><a href=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/sat/nvtcsezkbth>nvtcsezkbth</a></dd>\s*<dt>preview</dt>.*",
);
}

Expand Down
4 changes: 3 additions & 1 deletion src/templates/inscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ mod tests {
..default()
},
"
<h1>Inscription 1</h1>
.*<h1>Inscription 1</h1>
<div class=inscription>
<div>❮</div>
<iframe .* src=/preview/1{64}i1></iframe>
Expand Down Expand Up @@ -133,6 +133,8 @@ mod tests {
.*
<dt>sat</dt>
<dd><a href=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/sat/1>1</a></dd>
<dt>sat name</dt>
<dd><a href=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/sat/nvtdijuwxlo>nvtdijuwxlo</a></dd>
<dt>preview</dt>
.*
</dl>
Expand Down
2 changes: 2 additions & 0 deletions templates/inscription.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ <h1>Inscription {{ self.number }}</h1>
%% if let Some(sat) = self.sat {
<dt>sat</dt>
<dd><a href=/sat/{{sat}}>{{sat}}</a></dd>
<dt>sat name</dt>
<dd><a href=/sat/{{ sat.name() }}>{{ sat.name() }}</a></dd>
%% }
%% if let Some(metaprotocol) = self.inscription.metaprotocol() {
<dt>metaprotocol</dt>
Expand Down

0 comments on commit ce507bc

Please sign in to comment.