Frontend: getExplorerAddressUrl helper (Terra Classic explorer) #184
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#184
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add
getExplorerAddressUrl(address)(or equivalent) alongside existinggetExplorerTxUrl. Required before “View on explorer” in the wallet chip dropdown (#140 scope B).Acceptance criteria
mainnet/testnet/local(VITE_NETWORK/ constants).docs/frontend.md.Blocks
cc @Brouie @PlasticDigits
marked as related to #140
mentioned in issue #140
mentioned in commit
36d28a4c55Implementation summary (@Brouie — please verify)
Added
getExplorerAddressUrl(address)infrontend-dapp/src/utils/terraExplorer.ts, alongside existinggetExplorerTxUrl. Both helpers share chainlist-based Finder bases and respectVITE_NETWORK(local/mainnet/testnet).Behavior
local{lcd}/cosmos/auth/v1beta1/accounts/{addr}mainnethttps://finder.terraclassic.community/mainnet/address/{addr}testnethttps://finder.terra-classic.hexxagon.io/testnet/address/{addr}Docs / agent playbooks
skills/AGENTS_FRONTEND_TERRA_EXPLORER.mdAGENTS_FRONTEND_WALLET_CHIP.mdandAGENTS_FRONTEND_ORDER_HISTORY.mdMerged to
mainin commit36d28a4.Verification checklist
cd frontend-dapp && npm test -- --run src/utils/__tests__/terraExplorer.test.ts— 8 tests pass (tx + address × 3 networks + shorten helper)VITE_NETWORK=mainnetbuild:getExplorerAddressUrl('terra1…')opens Finder mainnet account pageVITE_NETWORK=testnetbuild: address link uses Hexxagon testnet FinderVITE_NETWORK=localdev: address link hits LocalTerra LCD…/cosmos/auth/v1beta1/accounts/…@Brouie — could you confirm the three network URLs above match your QA expectations before we close?
/issue remains open until dropdown wiring (#185) is verified.
mentioned in issue #183
mentioned in issue #188
mentioned in issue #185
qa cleared at source+test layer @PlasticDigits
verified
36d28a4c.terraExplorer.ts — getExplorerAddressUrl + getExplorerTxUrl both branch on DEFAULT_NETWORK. Local uses NETWORKS.local.terra.lcd + /cosmos/auth/v1beta1/accounts/{addr}; mainnet + testnet resolve via chainlist.json explorerUrl + /address/{addr}.
Unit tests 6/8 PASS. The 2 fails are a fixture gap on the local-build cases — the test only stubs VITE_NETWORK, not VITE_TERRA_LCD_URL, so QA's .env.local (http://127.0.0.1:1317) bleeds in and breaks the hardcoded http://localhost:1317 expectation. Helper is producing the correct URL for the env it's given; the test just needs vi.stubEnv('VITE_TERRA_LCD_URL', 'http://localhost:1317') in the two local-build cases. Worth a quick patch on your side.
mainnet + testnet branches pass cleanly. Local-build address link already verified live via the wallet dropdown View on explorer flow under #185.
good to close.
mentioned in issue #179
mentioned in issue #478
mentioned in issue #541
mentioned in issue #656