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: refresh wallet address before signing #318

Merged
merged 10 commits into from
Nov 19, 2024

Conversation

DanielSchiavini
Copy link
Collaborator

@DanielSchiavini DanielSchiavini commented Sep 24, 2024

What I did

How I did it

  • Call the RPC every time the BrowserEnv.eoa is used
  • An alternative approach would be to listen to accountChanged JavaScript event;
    • I have tried this approach in #318/a27f534
    • However, this is not going to work in colab as we don't have any mechanism to call the server.

How to verify it

Description for the changelog

Cute Animal Picture

image

@DanielSchiavini DanielSchiavini marked this pull request as ready for review September 24, 2024 11:44
@@ -160,6 +160,7 @@ def test_browser_signer_colab(colab_eval_mock, mocked_token, display_mock):
address = boa.env.generate_address()
colab_eval_mock.return_value = json.dumps({"data": [address]})
signer = BrowserSigner()
signer.update()
Copy link
Member

Choose a reason for hiding this comment

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

i guess BrowserSigner should call update() in the ctor

@charles-cooper charles-cooper merged commit c42ced2 into vyperlang:master Nov 19, 2024
8 of 9 checks passed
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.

2 participants