Open
Conversation
- 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
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.
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.