explorer
explorer copied to clipboard
[devnet] Fetch using wrong URL
Describe the bug When viewing a transaction in the explorer on devnet, the page tries to refresh after some time, but attempts to fetch from a bad URL, so the transaction page switches to the "This page is missing" view.
In my test, I am on viewing the transaction at http://localhost:8000/txid/ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.billboard?chain=mainnet.
The fetch is attempted from http://stacks-api.billboard.devnet:3999/extended/v1/tx/mempool?limit=30&offset=0&unanchored=true
To Reproduce This can be reproduced by running the devnet from the billboard example here - https://github.com/hirosystems/stacks-billboard, visiting the explorer URL above, then waiting 20 seconds for it to attempt to fetch updates.
Expected behavior The fetch should use localhost:3999 and the page should not refresh to "This page is missing".
The same problem happens if I change the network ?chain=testnet
, which correctly shows localhost:3999 in the UI:

I have feeling this is the problem with the devnet sandbox, whenever it attempts a transaction or any fetch, it all always reverts to stacks.co mainet , this is at the core this problem and issue 648. Does anyone know where the setting for this is in the local code?
I also think the guys that dealt with issue 540 will have the best idea, as they have been playing with changing default settings, if we can access the default mapping we could fix both this and problem 648.
?
We're working on a larger PR to refactor network state across the explorer that could potentially fix this issue.
This one should be fixed