Skip to content

Commit

Permalink
access key
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Jan 8, 2025
1 parent 066dfb3 commit eeb0b0f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/lib/near-social.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const SOCIAL_CONTRACT = {
mainnet: "social.near",
testnet: "v1.social08.testnet",
};
6 changes: 5 additions & 1 deletion src/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ import "../styles/globals.css";

import { NETWORK_ID } from "../config";
import { NearContext, Wallet } from "../wallets/near";
import { SOCIAL_CONTRACT } from "@/lib/near-social";

const wallet = new Wallet({ networkId: NETWORK_ID });
const wallet = new Wallet({
networkId: NETWORK_ID,
createAccessKeyFor: SOCIAL_CONTRACT[NETWORK_ID],
});

export default function App({ Component, pageProps }) {
const [signedAccountId, setSignedAccountId] = useState("");
Expand Down
4 changes: 2 additions & 2 deletions src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ConnectToNearButton } from "@/components/connext-to-near";
import { useTwitterConnection } from "@/store/twitter-store";
import { PenSquare } from "lucide-react";
import { useContext } from "react";
import { ComposePost, PostForm } from "../components/compose-post";
import { ComposePost } from "../components/compose-post";
import { ConnectToTwitterButton } from "../components/connect-to-twitter";
import { NearContext } from "../wallets/near";
import { useTwitterConnection } from "@/store/twitter-store";

export default function Home() {
const { signedAccountId } = useContext(NearContext);
Expand Down

0 comments on commit eeb0b0f

Please sign in to comment.