Skip to content

fix: replace dead tokensupply.singularitynet.io supply endpoints (#102) - #158

Merged
h2physics merged 1 commit into
minswap:mainfrom
Kshot3000:fix/dead-singularitynet-supply-endpoints
Sep 14, 2026
Merged

h2physics merged 1 commit into
minswap:mainfrom
Kshot3000:fix/dead-singularitynet-supply-endpoints

Conversation

@Kshot3000

Copy link
Copy Markdown
Contributor

Closes #102.

Three verified tokens still pointed their supply fields at the now-deprecated tokensupply.singularitynet.io API, which returns non-numeric HTML. getAmountFromURL() therefore returns null, and MarketCapApi.getMarketCapInfo() short-circuits to the null response — so Rejuve (RJV), NuNet (NTX) and SingularityNet (AGIX) currently render no market cap / circulating supply.

Change

For each of the three files (8cfd6893…524a56, edfd7a1d…e5458, f43a62fd…474958):

  • maxSupply: dead URL → documented total supply as a raw-unit integer (RJV 1e9, NTX 1e9, AGIX 2e9 human × 10^decimals). Matches the existing convention for the ~89 tokens that store a numeric maxSupply.
  • circulatingOnChain: dead URL → the on-chain asset id. getAmountFromArray() already resolves a bare asset id via getOnchainAmountOfAsset() (BlockFrost assetsById → quantity) to the live on-chain total — the same mechanism healthy tokens use. This is more accurate than a cached third-party number and removes the external-URL dependency entirely.

No code changes; only the three token YAMLs. maxSupply (number|string) and a circulatingOnChain asset-id item both satisfy tokenSchema (verified against ASSET_ID_REGEX and the getAmountFromArray dispatch).

Notes

…wap#102)

Three verified tokens (Rejuve RJV, NuNet NTX, SingularityNet AGIX) pointed
their maxSupply / circulatingOnChain fields at the now-deprecated
tokensupply.singularitynet.io API. getAmountFromURL() fetches that URL and
returns null on non-numeric HTML, so getMarketCapInfo() returns the null
response and these assets show no market cap.

Replace with stable, in-repo values:
  maxSupply        -> documented total supply as a raw-unit integer
  circulatingOnChain -> the on-chain asset id, which getAmountFromArray()
  already resolves via getOnchainAmountOfAsset() (BlockFrost assetsById ->
  quantity) to the live on-chain total. This is the same mechanism healthy
  tokens use and removes the external-URL dependency entirely.
@h2physics
h2physics merged commit e58cc71 into minswap:main Sep 14, 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.

Outdated token entries using deprecated SingularityNet endpoints

3 participants