Open PhilippeR26 opened 4 months ago
@PhilippeR26 I created NextJS page with the following component :
import Head from "next/head";
import styles from "@/styles/Home.module.css";
import { connect } from "get-starknet";
export default function MyPage() {
async function handleClick() {
const getWalletSWO = await connect({
modalMode: "alwaysAsk",
modalTheme: "light",
});
}
return (
<>
<Head>
<title>Create Next App</title>
<meta name="description" content="Generated by create next app" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/favicon.ico" />
</Head>
<main className={styles.main}>
<button onClick={handleClick}>Click me</button>
</main>
</>
);
}
And didn't get the issue. Can you send reproduction?
I created a minimalist Next.js project that will show how to replicate the problem : https://github.com/PhilippeR26/bugGetStarknet4
@PhilippeR26 "get-starknet": "^4.0.0" is not a legit version and we should remove it. Can you try "@starknet-io/get-starknet": "^4.0.0" ? This work for me.
With :
This code in a Next.js project :
is not displaying the default UI to select a wallet, and is generating an error :
@amanusk