Skip to content

fix(syscoin): keep asset metadata aligned in tx lists#28

Merged
sidhujag merged 3 commits into
masterfrom
syscoin-txdetail-asset-layout
Jun 30, 2026
Merged

fix(syscoin): keep asset metadata aligned in tx lists#28
sidhujag merged 3 commits into
masterfrom
syscoin-txdetail-asset-layout

Conversation

@sidhujag

Copy link
Copy Markdown
Member

Summary

  • Add a Syscoin-only layout for transaction list inputs/outputs so SPT metadata stays aligned with coin amounts.
  • Keep non-Syscoin Bitcoin-type transaction rows on the existing markup so upstream public-server golden tests remain stable.
  • Add matching CSS to both expanded and minified explorer stylesheets.

Test plan

  • Remote: go test -tags unittest ./server -run Test_PublicServer_BitcoinType -count=1
  • Remote: go test -tags unittest ./bchain/coins/sys ./db ./bchain -run 'Test(Syscoin|.*Syscoin|.*AssetVersion|.*LoadAssets|BaseMempool_GetTxAssets)' -count=1
  • Local: git diff --check && git diff --cached --check

Made with Cursor

Scope the asset-aware transaction row layout to Syscoin explorers so upstream Bitcoin-type pages keep their existing rendered markup.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c2f0a71a40

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread static/templates/txdetail.html Outdated
<a class="outpoint" href="/tx/{{$vin.Txid}}" tt="Outpoint {{$vin.Txid}},{{$vin.Vout}}">←</a>
{{end}}
</div>
{{if $vin.Addresses}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Show input assets even when no address decodes

For Syscoin inputs, this guard now hides the entire amount column, including the $vin.AssetInfo block. When an asset UTXO has an unparseable or unsupported script, the worker can still populate AssetInfo from the spent output while leaving Addresses empty, so the row regresses from showing the SPT asset metadata to only showing Unparsed address. Render this block when either addresses or asset metadata are present, or keep the asset metadata outside the address guard.

Useful? React with 👍 / 👎.

Keep Syscoin SPT input metadata visible when an input script cannot be decoded to an address but asset information is still available from the spent output.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sidhujag

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 50b6b2f537

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread static/css/main.css Outdated
Comment on lines +428 to +430
.tx-detail .head .txid {
float: none;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Scope the txid float reset to Syscoin

This selector is global for every transaction detail header, but the change is only needed for the new Syscoin badge layout. Because .txid still inherits display: block from the existing .tx-detail a.ellipsis rule, clearing its float makes any inline header content after the txid—most visibly the RBF marker on Bitcoin-style RBF transactions—render on a separate line instead of beside the txid. Scope this reset to Syscoin rows or to the badge case so non-Syscoin transaction headers keep their previous layout.

Useful? React with 👍 / 👎.

Remove the global transaction ID float reset so non-Syscoin headers keep their existing inline markers while Syscoin type badges still clear below the txid.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sidhujag

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: dfae0c2382

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sidhujag sidhujag merged commit 3a114f5 into master Jun 30, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant