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

Argent Webwallet Connector reports an empty address with starknet-react #130

Open
jisensee opened this issue Aug 27, 2024 · 2 comments
Open

Comments

@jisensee
Copy link

I have managed to get the webwallet working in my Next.js app with starknet react by upgrading my app to use

  • starknet@6.11.0
  • starknet-react@3.0.0-beta.2
  • starknetkit@2.2.26

Everything kinda works out of the box but the account field that is returned by the useAccount from starknet-react always contains an empty string instead of the actual address, even though I can see that the connector is fetching the accounts from the wallet successfully.

The issue is also present in the example dapp. Everything works but the address is not shown in the UI.

I managed to "fix" it by subclassing the connector and setting the address in the account method manually:

class MyWebWalletConnector extends WebWalletConnector {
  private address?: string

  async connect() {
    const result = await super.connect()
    this.address = result.account
    return result
  }
  async account(provider: ProviderOptions | ProviderInterface) {
    const acc = await super.account(provider)
    if (this.address) {
      acc.address = this.address
    }
    return acc
  }
}

So this seems like an issue with the connector implementation and not with starknet-react to me.

@bluecco
Copy link
Contributor

bluecco commented Aug 27, 2024

hi @jisensee, thanks for opening the issue
we're currently waiting for starknet-react to publish the latest version in order to make all the fixes needed

will update when it will be done

@bluecco
Copy link
Contributor

bluecco commented Oct 3, 2024

starknetkit@latest (2.3.2) is now available and compatible with starknet-react/core@latest (3.0.1)

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