feat(web): add CommunityFactory authorization preflight to community creation - #280
Merged
Caneryy merged 2 commits intoAug 30, 2026
Merged
Conversation
…creation Read the factory owner during creation readiness, compare it with the connected wallet (only when the wallet network matches the application network), and surface ready, disconnected, network-unknown, wrong-network, unauthorized, and read-failed states before any simulation or wallet approval. Unauthorized wallets can no longer reach the deploy approval action, and a factory owner read failure is retryable rather than reported as unauthorized. Also repair pre-existing breakage on main that blocked CI: sync the stale root lockfile (missing @testing-library/user-event broke `npm ci`), and fix committed type/lint errors in contracts.ts, useNetworkGuard.ts, useCommunityDeployment.ts, useTransactionLifecycle.ts, and the proposals pages. Closes stolla-labs#257
|
@esthereze is attempting to deploy a commit to the caneryy's projects Team on Vercel. A member of the Team first needs to authorize it. |
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Adds a CommunityFactory authorization preflight to community creation so the UI no longer invites any connected wallet to create a Community only to have
create_communityreject non-owners after transaction work begins. Plan ID N1, aligning to FR-4 / UJ-1.What changed
CommunityDeploymentAdaptergained areadFactoryOwner(factoryId, publicKey)method (with a real default implementation that readsowner()via a read-only simulation).CommunityDeploymentPanelnow resolves an authorization state during creation readiness before any simulation or wallet approval:ready,disconnected,network-unknown,wrong-network,unauthorized,read-failed, and a briefchecking.wrong-network, never asunauthorized.read-failedstate with a "Retry owner check" button — it is never reported asunauthorized.Tests
readFactoryOwner.Verification
npm run lint— passes (only pre-existing warnings remain).npm run typecheck— passes.npm test— the CommunityDeploymentPanel and CreateCommunityPage suites pass. Several unrelated pre-existing test failures remain onmain(files this PR does not touch:ProposalDetailPage,voteAggregation,CreateCommunityWizard,stellar.test,communityFactory/deployment.test&types.test); they fail identically without this change.Notes on pre-existing CI breakage repaired in this PR
maincould not currently passnpm ci(the committed rootpackage-lock.jsonwas missing@testing-library/user-event) and had committed type/lint errors. To allow CI to run at all, this PR also:npm cisucceeds, andcontracts.ts,useNetworkGuard.ts,useCommunityDeployment.ts,useTransactionLifecycle.ts, and the proposals pages.Closes #257