Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shreyas/neyn 3898 add new user registration example for web3 browser wallets #44

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
4 changes: 2 additions & 2 deletions wownar-react-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"lint": "next lint"
},
"dependencies": {
"@neynar/nodejs-sdk": "^1.69.1",
"@neynar/react": "^0.9.1",
"@neynar/nodejs-sdk": "^2.2.0",
"@neynar/react": "^0.9.7",
"@pigment-css/react": "^0.0.9",
"next": "14.2.10",
"react": "^18",
Expand Down
12 changes: 3 additions & 9 deletions wownar-react-sdk/src/app/Screens/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import styles from "./index.module.scss";
import Button from "@/components/Button";
import axios, { AxiosError } from "axios";
import { toast } from "react-toastify";
import { ErrorRes, ReactionType } from "@neynar/nodejs-sdk/build/neynar-api/v2";
import { ErrorRes, ReactionType } from "@neynar/nodejs-sdk/build/api";
import { useState, useEffect } from "react";
import { NeynarFrameCard, NeynarProfileCard, NeynarCastCard, useNeynarContext } from "@neynar/react";
import {
Expand All @@ -17,20 +17,14 @@ import {
type TransactionReceipt,
} from 'viem';
import { mainnet, base } from 'viem/chains';
import { ToastType } from "@/utils";

declare global {
interface Window {
ethereum: any;
}
}

export enum ToastType {
Success = "success",
Error = "error",
Warning = "warning",
Info = "info",
}

const NEYNAR_API_URL = "https://sdk-api.neynar.com";

export type TransactionCalldata = {
Expand Down Expand Up @@ -65,7 +59,7 @@ export type NeynarFrame = {
};

const Home = () => {
const { user, client_id, showToast } = useNeynarContext();
const { user, showToast } = useNeynarContext();
const [text, setText] = useState("");
const [signerValue, setSignerValue] = useState<string | null>(user?.signer_uuid || null);
const [account, setAccount] = useState<Address | null>(null);
Expand Down
Loading