From eaf467738a71b2bc5103c99acb3b59abad6e33b0 Mon Sep 17 00:00:00 2001 From: faisalnugroho Date: Sat, 30 May 2026 12:47:15 +0800 Subject: [PATCH] docs(readme): add missing await on provider.request() examples 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 #272 --- README.md | 4 ++-- packages/account-sdk/README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1dbf4b4b9..94299791d 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ yarn add @base-org/account 3. Request accounts to initialize a connection to wallet ```js - const addresses = provider.request({ + const addresses = await provider.request({ method: 'eth_requestAccounts', }); ``` @@ -181,7 +181,7 @@ yarn add @base-org/account 4. Make more requests ```js - provider.request('personal_sign', [ + await provider.request('personal_sign', [ `0x${Buffer.from('test message', 'utf8').toString('hex')}`, addresses[0], ]); diff --git a/packages/account-sdk/README.md b/packages/account-sdk/README.md index 1e7217dfa..2d2566ddf 100644 --- a/packages/account-sdk/README.md +++ b/packages/account-sdk/README.md @@ -78,7 +78,7 @@ 3. Request accounts to initialize a connection to wallet ```js - const addresses = provider.request({ + const addresses = await provider.request({ method: 'eth_requestAccounts', }); ``` @@ -86,7 +86,7 @@ 4. Make more requests ```js - provider.request('personal_sign', [ + await provider.request('personal_sign', [ `0x${Buffer.from('test message', 'utf8').toString('hex')}`, addresses[0], ]);