Skip to content

feat: add Stellar Expert explorer links to transaction toasts and fix…#173

Open
darius-daniel wants to merge 2 commits into
SO4-Markets:mainfrom
darius-daniel:fix/stellar-expert-links
Open

feat: add Stellar Expert explorer links to transaction toasts and fix…#173
darius-daniel wants to merge 2 commits into
SO4-Markets:mainfrom
darius-daniel:fix/stellar-expert-links

Conversation

@darius-daniel
Copy link
Copy Markdown

Pull Request: Add Stellar Expert explorer links to transaction toasts

Related Issues: Fixes #146, #110

Description

This PR implements automatic Stellar Expert explorer links for all transaction success toasts across the application. It also includes critical fixes for environment variable loading in the monorepo and addresses several TypeScript/Linter issues in the trade feature.

Changes

1. Transaction Explorer Links

  • useTxSubmit.tsx: Renamed from .ts and updated the submitTx utility to inject a "View transaction →" link into every success toast.
  • Links are dynamically generated using NETWORK.explorerBaseUrl (supporting both Testnet and Mainnet) and open in a new tab.
  • stellar.ts: Removed redundant window.open triggers as the link is now integrated into the toast UI.

2. Environment Configuration

  • vite.config.ts: Updated to correctly load environment variables from the monorepo root. This fixes the Missing env var: VITE_NETWORK error by allowing the app to detect the active network from the root .env and then load the corresponding apps/web/.env.{network} file.

3. DX & Type Safety

  • query-keys.ts: Refactored the trade query key factory to support both flat and namespaced access, resolving multiple Property 'trade' does not exist linter errors.
  • useFundingRate.ts: Fixed a type error where the marketAddress was missing from the query key.
  • Cleaned up unused imports and variables in several components.

Verification Results

  • Acceptance Criteria: All 20+ write functions (Trade, Earn, Referrals) now produce success toasts with a functional explorer link.
  • Build: bun run dev and bun run typecheck pass successfully.
  • UI: The link is styled as a subtle action within the toast, maintaining the app's clean aesthetic.

Closes #146

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 2, 2026

@darius-daniel Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

#110 — Add Stellar Expert explorer links to all tx toasts

1 participant