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

Fix/connectors account #132

Merged
merged 3 commits into from
Sep 30, 2024
Merged

Fix/connectors account #132

merged 3 commits into from
Sep 30, 2024

Conversation

bluecco
Copy link
Contributor

@bluecco bluecco commented Sep 24, 2024

Issue / feature description

  • account method for connectors are using starknetjs WalletAccount

this is causing issues for webwallet and argent in app browsers since a request is performed in the constructor

walletProvider
      .request({
        type: 'wallet_requestAccounts',
        params: {
          silent_mode: false,
        },
      })
      .then((res) => {
        this.address = res[0].toLowerCase();
      });

This call will display an additional popup for webwallet and in app browser connection due to the wallet request

Changes

  • update account method to use an Account instead of WalletAccount since the return type is an AccountInterface anyway
  • connect callback doesn't perform connector.connect() if the resultType is connector

Checklist

  • Rebased to the last commit of the target branch (or merged)
  • Code self-reviewed
  • Code self-tested
  • Tests updated (if needed)
  • All tests are passing locally

Please keep your pull request as small as possible. If you need to make multiple changes, please create separate pull requests for each change. Create a draft pull request if you need early feedback. This will mark the pull request as a work in progress and prevent it from being reviewed or merged until you are ready.

Please move drafts to the ready for review (regular PR) when you are ready to start the review process and other developers will pick it up from there.

Copy link
Member

@Cussone Cussone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me 👍🏼

@bluecco bluecco merged commit b64d7b1 into develop Sep 30, 2024
1 check passed
@bluecco bluecco deleted the fix/connectors-account branch September 30, 2024 10:13
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

Successfully merging this pull request may close these issues.

3 participants