feat(auth): use generateNonce util fn (#61)

This commit is contained in:
Ben Kremer 2022-09-15 17:59:54 +02:00 committed by GitHub
parent 11d832ca8d
commit ec908fc6c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
import { Box } from "@chakra-ui/react";
import AuthClient from "@walletconnect/auth-client";
import AuthClient, { generateNonce } from "@walletconnect/auth-client";
import { version } from "@walletconnect/auth-client/package.json";
import type { NextPage } from "next";
import { useCallback, useEffect, useState } from "react";
@ -22,7 +22,7 @@ const Home: NextPage = () => {
domain: "localhost:3000",
chainId: "eip155:1",
type: "eip4361",
nonce: "nonce",
nonce: generateNonce(),
statement: "Sign in with wallet.",
})
.then(({ uri }) => setUri(uri));