Skip to content

several updates - #7

Merged
Frank-GER merged 3 commits into
syscoin:mainfrom
Frank-GER:main
Aug 8, 2026
Merged

several updates#7
Frank-GER merged 3 commits into
syscoin:mainfrom
Frank-GER:main

Conversation

@Frank-GER

Copy link
Copy Markdown
Member
  • previously uncommitted refactoring
  • update TOTAL_SUPPLY_URL
  • minor fixes for docker container

- previously uncommitted refactoring
- update TOTAL_SUPPLY_URL
- minor fixes for docker container
@sidhujag

sidhujag commented Aug 5, 2026

Copy link
Copy Markdown
Member

@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: 5aab79136e

ℹ️ 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 index.js Outdated
// temp use explorer1.syscoin.org until explorer2 is fixed
const TOTAL_SUPPLY_URL =
"https://explorer-v5.syscoin.org/api?module=stats&action=coinsupply";
"https://explorer.syscoin.org/api?module=stats&action=coinsupply";

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 Parse Blockscout coinsupply responses

When deployed with this new explorer.syscoin.org URL, the coinsupply endpoint returns the Blockscout/Etherscan-compatible object shape with a string result value in wei, not a bare number (Blockscout docs). Because getSupply() still assigns explorerResponse.data directly to nevmSupply and checks for typeof === 'number', every successful response from this host is rejected and the supply endpoints remain uninitialized/503; parse data.result with the proper unit conversion or keep using an endpoint that returns the expected number.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Both endpoints are up and return the legacy bare-number format (SYS units).
Blockscout v11.0.1 introduced a wrapper.
What changed is only the wrapper. The controller still does Wei.to(:ether) before render, so result stays in coin units (SYS/ETH), not wei. Live check: eth.blockscout.com returns ~175M in result, not ~1.75e26.
Still true on latest release v11.2.4
The view only wraps that string in {status, message, result} — no unit change there. So result is still ether/SYS units on latest Blockscout.
The docs show the envelope shape correctly for ≥ v11.0.1; the example value/unit is wrong.

Commit 6c038a4 takes care of the possible wrapper.

Comment thread .gitignore

node_modules
.env No newline at end of file
config/env

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 Keep ignoring legacy .env secrets

When developers still have a root .env created from the previous .env.example, replacing the ignore entry makes that RPC username/password file show up as untracked during this migration. Keeping config/env ignored is correct, but .env should remain ignored too to avoid accidental secret commits from existing checkouts.

Useful? React with 👍 / 👎.

cover actual used legacy bare-number and latest Blockscout wrapper format

Note: Wrapped result still uses coin units.
Change from general explorer URL to
specific node URL + backup

The general URL returns slightly different values
based on the choosen node (cache, update interval).
This change chooses the same single node for consistancy
but provides a backup URL in case the first node fails.
@Frank-GER
Frank-GER merged commit 080be3c into syscoin:main Aug 8, 2026
1 check 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.

2 participants