From 18c195ae7cf51c2957ca4a0fd4f75ca71daab556 Mon Sep 17 00:00:00 2001 From: calvinchang Date: Tue, 24 Oct 2023 16:22:04 +0800 Subject: [PATCH 1/2] refactor: adjust web3-react-connector's activate method adjust web3-react-connector's activate method to comply with @blocto/sdk pr #308 changes --- adapters/web3-react-connector/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/web3-react-connector/src/index.ts b/adapters/web3-react-connector/src/index.ts index 9e043b93..7ff4c990 100644 --- a/adapters/web3-react-connector/src/index.ts +++ b/adapters/web3-react-connector/src/index.ts @@ -71,7 +71,7 @@ export class BloctoConnector extends Connector { !desiredChainId || parseChainId(desiredChainId) === parseChainId(this.provider.chainId) ) { - const accounts = await this.provider.request({ method: 'eth_accounts' }); + const accounts = await this.provider.request({ method: 'eth_requestAccounts' }); return this.actions.update({ chainId: parseChainId(this.provider.chainId), accounts, From 1d0508266ceca7367fe594c0c237e8e0c39dd9f4 Mon Sep 17 00:00:00 2001 From: calvinchang Date: Tue, 24 Oct 2023 16:28:30 +0800 Subject: [PATCH 2/2] chore: add changeset --- .changeset/gorgeous-hairs-yell.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/gorgeous-hairs-yell.md diff --git a/.changeset/gorgeous-hairs-yell.md b/.changeset/gorgeous-hairs-yell.md new file mode 100644 index 00000000..4f2bd1a9 --- /dev/null +++ b/.changeset/gorgeous-hairs-yell.md @@ -0,0 +1,5 @@ +--- +'@blocto/web3-react-connector': patch +--- + +refactor: adjust web3-react-connector's activate method to comply with @blocto/sdk's changes