Skip to content

Build Event Creation Form Page#61

Open
Otaiki1 wants to merge 5 commits intocrowdpass-live:mainfrom
Otaiki1:feat/build-event-creation-form-page
Open

Build Event Creation Form Page#61
Otaiki1 wants to merge 5 commits intocrowdpass-live:mainfrom
Otaiki1:feat/build-event-creation-form-page

Conversation

@Otaiki1
Copy link
Contributor

@Otaiki1 Otaiki1 commented Feb 26, 2026

This PR closes #34

✅ Work Completed

I've added a new event‑creation workflow to the soroban-client Next.js app, wired up to your Soroban EventManager contract and Freighter wallet. Here’s what’s been done:

📁 New Files & Modifications
File Purpose
lib/soroban.ts Helper that builds, signs (via Freighter) and submits a create_event Soroban call.
page.tsx Client component presenting the form, performing validation and invoking the helper.
Header.tsx “Create Events” button/link updated (desktop & mobile) to navigate to /create-event. Mobile nav now also lists the page.
.env.local Example environment file containing network & contract settings.
README.md Instructions added for env vars and using the new form.
🧠 How the Form Works
Fields: Event name, description, start/end date‑times, ticket price (XLM), total tickets, optional image.
Validation:
Dates must be in the future and end after start.
Price ≥ 0, tickets a positive integer.
Wallet handling:
Prompts connection if not already connected.
Requires Freighter installed.
Submission flow:
Converts inputs to Soroban‑compatible values.
Builds a transaction with Operation.invokeContractFunction.
Calls signTransaction from @stellar/freighter-api.
Submits the signed XDR to Horizon.
Displays success or error messages and optionally redirects.

- Regenerated package-lock.json to resolve merge conflict
- Fixed WalletContext test mocks to return proper structure from isConnected()
- Added missing isAllowed mock to wallet context tests
- Updated Header component tests to handle multiple DOM elements from responsive layout
- All 9 tests now passing
@Otaiki1 Otaiki1 changed the title draft Build Event Creation Form Page Feb 26, 2026
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.

Build event creation form page in soroban-client

1 participant