Skip to content

Comments

fix: refresh wallet address before signing#318

Merged
charles-cooper merged 10 commits intovyperlang:masterfrom
DanielSchiavini:wallet-eoa
Nov 19, 2024
Merged

fix: refresh wallet address before signing#318
charles-cooper merged 10 commits intovyperlang:masterfrom
DanielSchiavini:wallet-eoa

Conversation

@DanielSchiavini
Copy link
Contributor

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

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