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

feat: disconnect #84

Merged
merged 3 commits into from
Apr 29, 2022
Merged

feat: disconnect #84

merged 3 commits into from
Apr 29, 2022

Conversation

rootulp
Copy link
Contributor

@rootulp rootulp commented Apr 28, 2022

Fixes #79

2022-04-28 16 19 00

throw new UserNotConnectedError()
}

starknet.off('accountsChanged', () => {})
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@janek26 is this the expected way to disconnect a connected Argent account?

Copy link

Choose a reason for hiding this comment

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

this is entirely up to the dapp. Connection status is not stored in Argent X, but just in the wallet.
In get-starknet we handle it like this: https://github.com/starknet-community-libs/get-starknet/blob/master/src/index.ts#L92

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for sharing! I'll defer to maintainers then

@rootulp
Copy link
Contributor Author

rootulp commented Apr 28, 2022

Hmm the test failure appears not related to this PR

    thrown: "Exceeded timeout of 5000 ms for a test.

It looks like getting block is taking too long. I bumped the timeout to 15s locally and a handful of test runs are now succeeding.

@rootulp rootulp marked this pull request as ready for review April 28, 2022 15:23
@fracek
Copy link
Contributor

fracek commented Apr 28, 2022

Looks good! Can you add a changeset with yarn changeset?

@fracek fracek merged commit d9a322d into apibara:main Apr 29, 2022
This was referenced Apr 29, 2022
@rootulp rootulp deleted the rp/disconnect branch April 29, 2022 20:19
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.

disconnect wallet
3 participants