several updates - #7
Conversation
Frank-GER
commented
Aug 5, 2026
- previously uncommitted refactoring
- update TOTAL_SUPPLY_URL
- minor fixes for docker container
- previously uncommitted refactoring - update TOTAL_SUPPLY_URL - minor fixes for docker container
|
@codex review |
There was a problem hiding this comment.
💡 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".
| // 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"; |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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.
|
|
||
| node_modules | ||
| .env No newline at end of file | ||
| config/env |
There was a problem hiding this comment.
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.