Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusmolchany committed Feb 2, 2022
1 parent ed48596 commit 5e6eaf3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function TokenGateButton({ signer }) {
});

try {
const resp = axios.post("/api/token-gate", {
const resp = await axios.post("/api/token-gate", {
address: userAddress,
signedMessage,
});
Expand All @@ -101,7 +101,7 @@ function TokenGateButton({ signer }) {
}

// server-side api
import ethers from "ethers";
import { ethers } from "ethers";
import { secureServerSideTokenGate } from "tokengate";

const balanceOfThreshold = 1; /* require 1 bayc nft */
Expand All @@ -117,7 +117,7 @@ app.post("/api/token-gate", (req, res) => {
// create a web3 provider
const provider = new ethers.providers.InfuraProvider();

const isAllowed = secureServerSideTokenGate({
const isAllowed = await secureServerSideTokenGate({
address,
balanceOfThreshold,
contractAddress,
Expand Down

0 comments on commit 5e6eaf3

Please sign in to comment.