Skip to content

fix: show actual connected wallet network instead of hardcoded Stella… - #158

Merged
JamesVictor-O merged 1 commit into
Ads-Bazaar:mainfrom
Yerimahjr:fix/network-label-review-screen-143
Aug 22, 2026
Merged

fix: show actual connected wallet network instead of hardcoded Stella…#158
JamesVictor-O merged 1 commit into
Ads-Bazaar:mainfrom
Yerimahjr:fix/network-label-review-screen-143

Conversation

@Yerimahjr

Copy link
Copy Markdown
Contributor

Closes #143

Replaces the hardcoded "Stellar Mainnet" label on the Review & Fund screen with the actual connected wallet's network.

Changes:

  • Added formatNetworkLabel() to map Freighter's raw network values (PUBLIC, TESTNET, FUTURENET) to readable labels
  • Network label now reflects wallet.network, falling back to "Unknown network" when unavailable
  • Added a visible warning when the connected network isn't mainnet, before the user funds escrow

Testing: Verified via build (next build passes clean) and manual browser walkthrough of the campaign wizard, confirming the Testnet label and mismatch warning render correctly.

Note: next lint fails in this repo regardless of this change (pre-existing pnpm --filter / monorepo tooling issue, not related to this fix).

@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

@YerimahOfTimes is attempting to deploy a commit to the victorjames408gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

…r Mainnet

Closes Ads-Bazaar#143

- Replace hardcoded 'Stellar Mainnet' label with wallet.network from useWallet()
- Add formatNetworkLabel() to map Freighter's PUBLIC/TESTNET/FUTURENET to readable labels
- Fall back to 'Unknown network' when no wallet/network is available
- Show a visible warning when the connected network isn't mainnet, before funding
@Yerimahjr
Yerimahjr force-pushed the fix/network-label-review-screen-143 branch from 9400606 to 12ff721 Compare August 21, 2026 12:47

@JamesVictor-O JamesVictor-O left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approve

Reviewed with a full local checkout:

  • Build: next build passes clean.
  • Type check: tsc --noEmit clean.
  • Mergeable: no conflicts with main.
  • Code: Verified network is populated from Freighter's getNetworkDetails().network in wallet-provider.tsx, which does return the raw PUBLIC/TESTNET/FUTURENET identifiers this PR's formatNetworkLabel() maps — the mapping is correct. The mismatch warning is a nice safety addition before funds are locked. Ungraceful fallback (raw string for unmapped values like STANDALONE) is a minor cosmetic edge case, not worth blocking on.

Noted the author's disclosure that next lint fails repo-wide for unrelated pre-existing reasons — confirmed that's fixed separately in #155 (eslint config migration), not a gap in this PR.

No issues found. Merging.

@JamesVictor-O
JamesVictor-O merged commit 609de79 into Ads-Bazaar:main Aug 22, 2026
0 of 2 checks 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.

bug: fund-confirmation screen hardcodes "Stellar Mainnet" instead of the actual connected wallet network

2 participants