Skip to content

fix(syscoin): restore explorer UX after upstream merge#24

Merged
sidhujag merged 3 commits into
upstream-latestfrom
syscoin-ux-upstream-latest-fix
Jun 30, 2026
Merged

fix(syscoin): restore explorer UX after upstream merge#24
sidhujag merged 3 commits into
upstream-latestfrom
syscoin-ux-upstream-latest-fix

Conversation

@sidhujag

Copy link
Copy Markdown
Member

Summary

  • Restore Syscoin explorer templates and SPT metadata display after the upstream merge.
  • Guard Syscoin-only template fields in shared upstream templates so non-Syscoin explorer pages still render.
  • Fix invalid explorer HTML and update public-server golden expectations accordingly.

Test plan

  • Remote: make test BIN_IMAGE=blockbook-build-syscoin ARGS=\"-run Test_PublicServer_BitcoinType -count=1\"
  • Local: git diff --check && git diff --cached --check

Made with Cursor

Preserve Syscoin explorer surfaces on the upstream-latest base and keep shared templates guarded so non-Syscoin explorers continue to render correctly.

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: 3fd730561e

ℹ️ 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".

</tr>
{{/* SYSCOIN: expose SPT transaction metadata on the full transaction page. */}}
{{if isSyscoinShortcut $data.CoinShortcut}}
{{if $tx.TokenType}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add backing Tx fields before rendering Syscoin tx pages

For SYS/TSYS this branch is evaluated on every Bitcoin-type transaction page, but api.Tx does not define TokenType or Memo (and the later rows also use non-existent AssetGuid fields on api.TokenTransfer). Go templates return an execution error for missing struct fields, so Syscoin transaction pages render only partially instead of showing the transaction.

Useful? React with 👍 / 👎.

</tr>
{{/* SYSCOIN: show unconfirmed SPT balances on normal address pages. */}}
{{if isSyscoinShortcut .CoinShortcut}}
{{if $addr.TokensAsset}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add backing address asset fields before rendering them

On SYS/TSYS address pages this if tries to read TokensAsset from api.Address, but that struct has no such field (nor the related UsedAssetTokens used in xpub.html). The first Syscoin address render that reaches this block will hit a template execution error for the missing field and truncate the page instead of displaying address details.

Useful? React with 👍 / 👎.

<div class="row mt-3">
<div class="form-group col-md-6">
<label for="maxfeerate">Max fee rate</label>
<input id="maxfeerate" class="form-control" name="maxfeerate" value="{{.SendTxMaxFeeRate}}" placeholder="Optional">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add sendtx fields before referencing them

For SYS/TSYS /sendtx, this input evaluates .SendTxMaxFeeRate, but TemplateData only contains SendTxHex and Status for this form and no SendTxMaxFeeRate/SendTxMaxBurnAmount fields. That makes the Syscoin send-transaction page fail during template execution before users can submit the form.

Useful? React with 👍 / 👎.

</tr>
{{range $t := $addr.TokensAsset}}
<tr>
<td><a href="/asset/{{$t.AssetGuid}}" class="copyable">{{$t.AssetGuid}}</a></td>

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 Wire asset routes before linking to them

These new Syscoin asset links point at /asset/<guid>, but I searched server/ for assetTpl, explorerAsset, asset.html, and HandleFunc(...asset...) and found no route or template registration for the newly added asset.html/assets.html. Once the asset rows render, clicking any GUID falls through to the catch-all explorer handler instead of an asset detail page.

Useful? React with 👍 / 👎.

@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: 9aa8a665b9

ℹ️ 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 server/public.go Outdated
}

// SYSCOIN
func (s *PublicServer) formatContractExplorerURL(contract string) string {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove duplicated public template helpers

This method is already declared later in server/public.go, and this added block also repeats several existing helper declarations below it, so any build of the server package fails with duplicate-declaration errors before the explorer can start. Keep a single implementation instead of re-declaring these helpers here.

Useful? React with 👍 / 👎.

@sidhujag

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 3987dae466

ℹ️ 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 e73682e into upstream-latest 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