Skip to content

docs(readme): add missing await on provider.request() examples#331

Open
faisalnugroho wants to merge 1 commit into
base:masterfrom
faisalnugroho:fix/readme-missing-await
Open

docs(readme): add missing await on provider.request() examples#331
faisalnugroho wants to merge 1 commit into
base:masterfrom
faisalnugroho:fix/readme-missing-await

Conversation

@faisalnugroho
Copy link
Copy Markdown

Closes #272

Summary

Two provider.request() calls in the README examples are missing await. Since provider.request() returns a Promise, anyone copying these examples would get unresolved Promises instead of actual values.

Changes

  • Root README.md: Added await to eth_requestAccounts and personal_sign examples
  • packages/account-sdk/README.md: Same fix in the package-level README

Before

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

After

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

provider.request() returns a Promise, so all call sites in the README
examples need await. Without it, copied code would silently produce
unresolved Promises instead of actual account addresses or signatures.

Fixes base#272
@cb-heimdall
Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@faisalnugroho
Copy link
Copy Markdown
Author

Hi! I'd love to get this PR reviewed when you have a moment. This PR addresses add missing await on provider.request() examples. Happy to make any adjustments based on your feedback. Let me know if there's anything I can do to help move this forward.

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.

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

2 participants