Skip to content

Commit

Permalink
remove select askAmount
Browse files Browse the repository at this point in the history
  • Loading branch information
technophile-04 committed Mar 14, 2024
1 parent da82300 commit 1b2f074
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
5 changes: 5 additions & 0 deletions packages/nextjs/app/api/grants/new/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export async function POST(req: Request) {
return NextResponse.json({ error: "Invalid form details submited" }, { status: 400 });
}

// Check to see if the askAmount === 0.25
if (Number(askAmount) !== 0.25) {
return NextResponse.json({ error: "Invalid askAmount" }, { status: 400 });
}

// Verif if the builder is present
const builder = await findUserByAddress(signer);
if (!builder.exists) {
Expand Down
15 changes: 1 addition & 14 deletions packages/nextjs/app/apply/_component/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ type ReqBody = {
signer?: string;
};

const selectOptions = [0.1, 0.25, 0.5, 1];

const Form = () => {
const { address: connectedAddress } = useAccount();
const { signTypedDataAsync } = useSignTypedData();
Expand All @@ -34,7 +32,7 @@ const Form = () => {
try {
const title = formData.get("title") as string;
const description = formData.get("description") as string;
const askAmount = formData.get("askAmount") as string;
const askAmount = "0.25";
if (!title || !description || !askAmount) {
notification.error("Please fill all the fields");
return;
Expand Down Expand Up @@ -91,17 +89,6 @@ const Form = () => {
/>
</div>
</div>
<div className="space-y-2">
<p className="m-0 text-xl ml-2">Ask amount</p>
<select className="select bg-base-200 select-primary select-md select-bordered w-full" name="askAmount">
<option disabled>Select amount</option>
{selectOptions.map(option => (
<option key={option} value={option}>
{option} ETH
</option>
))}
</select>
</div>
<SubmitButton />
</form>
</div>
Expand Down

0 comments on commit 1b2f074

Please sign in to comment.