Show unknown software as Not present

This commit is contained in:
DataHoarder 2023-04-13 21:50:07 +02:00
parent 8a2a35b6be
commit fdebd44b1f
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk
2 changed files with 5 additions and 1 deletions

View file

@ -111,7 +111,7 @@
<th title="The seed is used for the deterministic generation of the Coinbase Private Key, and is derived from other fields in the share or historic data.">Coinbase Private Key Seed</th>
</tr>
<tr>
<td>{% if raw.ShareVersion()|str != "v1" %}{{ raw.Side.ExtraBuffer.SoftwareId }} {{ raw.Side.ExtraBuffer.SoftwareVersion }}{% else %}Not present{% endif %}</td>
<td>{{ software_info(raw.Side.ExtraBuffer.SoftwareId, raw.Side.ExtraBuffer.SoftwareVersion) }}</td>
<td>{{ raw.ShareVersion() }} <span class="small">({% if raw.ShareVersionSignaling()|str != "none" %}signaling {{ raw.ShareVersionSignaling() }} support{% else %}no known signaling{% endif %})</span></td>
<td></td>
<td class="mono smaller">{{ raw.GetPrivateKeySeed() }}</td>

View file

@ -406,6 +406,10 @@ func main() {
if len(args) != 2 {
return nil
}
if toUint64(args[0]) == 0 && toUint64(args[1]) == 0 {
return "Not present"
}
return fmt.Sprintf("%s %s", types2.SoftwareId(toUint64(args[0])).String(), types2.SoftwareVersion(toUint64(args[1])).String())
}