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

get-starknet v4 UI is not working #257

Open
PhilippeR26 opened this issue Jul 4, 2024 · 3 comments
Open

get-starknet v4 UI is not working #257

PhilippeR26 opened this issue Jul 4, 2024 · 3 comments

Comments

@PhilippeR26
Copy link

PhilippeR26 commented Jul 4, 2024

With :

"get-starknet": "^4.0.0",

This code in a Next.js project :

import { connect } from "get-starknet";
const getWalletSWO = await connect({ modalMode: "alwaysAsk", modalTheme: "light" });

is not displaying the default UI to select a wallet, and is generating an error :
image

@amanusk

@naorye2
Copy link
Collaborator

naorye2 commented Jul 22, 2024

@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?

@PhilippeR26
Copy link
Author

I created a minimalist Next.js project that will show how to replicate the problem : https://github.com/PhilippeR26/bugGetStarknet4

@naorye2
Copy link
Collaborator

naorye2 commented Sep 4, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants