Finish campaign features: orphaned wiring, network-mismatch guard, real fees, standalone + typecheck gate#905
Merged
Merged
Conversation
…ingleton The module stellarService singleton is never setNetwork-synced (nothing calls it), so it stays on the default testnet. Now that FeeDisplay is rendered in TokenForm, reading fees from that singleton would show testnet fees on a mainnet deployment. Switch to useFactoryState (env-resolved network, same source as the rest of the app) and drop FeeDisplay's stale module cache. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…plicate, fix repo URLs Finish merged-but-unwired campaign features: - Render NetworkMismatchBanner (from NetworkBadge.tsx) in App — it warns when Freighter's network differs from the app's; it was built but never mounted. - Add a /faq route + NavBar link for the FAQ page, which existed but was never routed. - Remove WalletConnectButton.tsx, a dead duplicate of the actively-used UI/WalletButton (never imported anywhere). - README: point deploy/docs/issues links at Favourorg/Stellar-forge (the actual origin) instead of the stale Ejirowebfi URLs.
…rites on network mismatch - Create + mint now pay the on-chain base_fee (from useFactoryState) instead of a hardcoded 0.01 XLM. The contract rejects create/mint when fee_payment < base_fee, so the hardcode would fail InsufficientFee on any factory whose fee is above 0.01 XLM. - Render FeeDisplay (real fee + USD) in the mint flow; drop the hardcoded ESTIMATED_FEE display constants. - Fix a latent unit bug in FeeDisplay/MintForm: formatXLM expects stroops but was passed already-converted XLM, which throws 'Cannot convert 0.01 to a BigInt' for fractional fees (dormant only because FeeDisplay was orphaned). - Wire useNetworkGuard into create/mint/burn: submit is disabled with a reason when Freighter's network differs from the app's, completing the mismatch guard alongside the NetworkMismatchBanner.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the merged campaign issues and fixes a few correctness gaps so the app works end-to-end. Supersedes #904 (this branch contains that work plus the items below).
1. Wire orphaned (built-but-invisible) features
OnboardingModal(Help button now works; no longer auto-overlays on first visit).FeeDisplay(real fee + USD) in the create and mint flows.AnalyticsOptOutin a footer (privacy opt-out reachable)./activityroute renderingTransactionHistory→ unlocks CSV export + polling.FAQto a/faqroute + nav link.2.
standalonenetwork gapstandalonetoNetworkSwitcherbadge colors and both explorer/URL helpers (E2E CI builds withVITE_NETWORK=standalone) and theStellarService/network-helper chain.3. Typecheck gate in CI
typecheckscript + atsc --noEmitjob to.github/workflows/ci.yml(CI previously never rantsc). Fixed all 88 pre-existing type errors so the gate is green.4. Network-mismatch safety feature
NetworkMismatchBanner(warns when Freighter's network ≠ the app's).useNetworkGuardinto create/mint/burn: submit is disabled with a reason on mismatch.5. Correctness / cleanup
base_feein create + mint (was hardcoded0.01 XLM; contract rejectsfee_payment < base_fee, so the hardcode would failInsufficientFee).formatXLMexpects stroops but was passed converted XLM (Cannot convert 0.01 to a BigInt).Ejirowebfi→Favourorg(actual origin).WalletConnectButton.tsx.Verification
main).Known risks / follow-ups
feePaymentchange touches the signed-tx path, which can't be verified headlessly (no Freighter/testnet in CI). Logically correct + unit-tested; smoke-test on testnet before release.useNetworkGuardis wired into create/mint/burn only; MetadataForm/AdminPanel still rely on the banner's warning.TokenCreateForm.tsxleft in place — a richer unused create flow, not a pure duplicate; adopt-or-remove is a product call.