Skip to content

Bug: README code examples missing await on provider.request() calls #272

@Sertug17

Description

@Sertug17

Describe the bug

Two code examples in the README are missing await on provider.request() calls, which would cause unexpected behavior for anyone copying the examples.

Steps

  1. See README.md lines 176 and 184
  2. const addresses = provider.request({ method: 'eth_requestAccounts' });
  3. provider.request('personal_sign', [...]);

Expected behavior

Both calls should have await since provider.request() returns a Promise:

const addresses = await provider.request({ method: 'eth_requestAccounts' });
await provider.request('personal_sign', [...]);

Version

latest

Additional info

No response

Desktop

No response

Smartphone

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions