From eb4f86e65904db2eff1a26f91aeaa2ad3dd31c43 Mon Sep 17 00:00:00 2001 From: calvinchang Date: Mon, 23 Oct 2023 16:31:20 +0800 Subject: [PATCH 1/6] feat: adjust eth_accounts to not require prior enable --- packages/blocto-sdk/src/providers/ethereum.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/blocto-sdk/src/providers/ethereum.ts b/packages/blocto-sdk/src/providers/ethereum.ts index 5368a519..ddd39348 100644 --- a/packages/blocto-sdk/src/providers/ethereum.ts +++ b/packages/blocto-sdk/src/providers/ethereum.ts @@ -355,6 +355,8 @@ export default class EthereumProvider case 'wallet_disconnect': { return this.handleDisconnect(); } + case 'eth_accounts': + return getEvmAddress(sessionKey, blockchainName) || []; } // Method that requires user to be connected @@ -369,13 +371,11 @@ export default class EthereumProvider try { let response = null; let result = null; + switch (payload.method) { case 'eth_requestAccounts': await this.fetchAccounts(); // eslint-disable-next-line - case 'eth_accounts': - result = getEvmAddress(sessionKey, blockchainName); - break; case 'eth_coinbase': { result = getEvmAddress(sessionKey, blockchainName)?.[0]; break; From 90c6bd22f151a5edd852fe5941d23cddefe33e39 Mon Sep 17 00:00:00 2001 From: calvinchang Date: Mon, 23 Oct 2023 16:33:08 +0800 Subject: [PATCH 2/6] fix: fix connector.ts type --- adapters/wagmi-connector/src/connector.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/wagmi-connector/src/connector.ts b/adapters/wagmi-connector/src/connector.ts index 0968af44..0cc7f971 100644 --- a/adapters/wagmi-connector/src/connector.ts +++ b/adapters/wagmi-connector/src/connector.ts @@ -179,7 +179,7 @@ class BloctoConnector extends Connector { account, chain, transport: custom(provider), - }); + }) as WalletClient; } protected onAccountsChanged(): void { From 58ef7a0a511d0ea47b5f7891cc4d7dcfc0656f6c Mon Sep 17 00:00:00 2001 From: calvinchang Date: Mon, 23 Oct 2023 16:38:00 +0800 Subject: [PATCH 3/6] chore: add changeset --- .changeset/curvy-students-trade.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/curvy-students-trade.md diff --git a/.changeset/curvy-students-trade.md b/.changeset/curvy-students-trade.md new file mode 100644 index 00000000..25e154fa --- /dev/null +++ b/.changeset/curvy-students-trade.md @@ -0,0 +1,5 @@ +--- +'@blocto/sdk': patch +--- + +adjust eth_accounts to not require prior enable From 18c195ae7cf51c2957ca4a0fd4f75ca71daab556 Mon Sep 17 00:00:00 2001 From: calvinchang Date: Tue, 24 Oct 2023 16:22:04 +0800 Subject: [PATCH 4/6] 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 5/6] 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 From deeb6ed297fb938dc2f54b55fb564d7bb0482dad Mon Sep 17 00:00:00 2001 From: sanyu1225 Date: Thu, 26 Oct 2023 03:51:59 +0000 Subject: [PATCH 6/6] ci: bump package version --- .changeset/curvy-students-trade.md | 5 ----- .changeset/funny-elephants-thank.md | 10 ---------- .changeset/gorgeous-hairs-yell.md | 5 ----- .changeset/new-brooms-refuse.md | 5 ----- .changeset/six-foxes-add.md | 5 ----- adapters/connectkit-connector/CHANGELOG.md | 8 ++++++++ adapters/connectkit-connector/package.json | 4 ++-- adapters/rainbowkit-connector/CHANGELOG.md | 8 ++++++++ adapters/rainbowkit-connector/package.json | 4 ++-- adapters/wagmi-connector/CHANGELOG.md | 10 ++++++++++ adapters/wagmi-connector/package.json | 4 ++-- adapters/web3-react-connector/CHANGELOG.md | 11 +++++++++++ adapters/web3-react-connector/package.json | 4 ++-- adapters/web3modal-connector/CHANGELOG.md | 8 ++++++++ adapters/web3modal-connector/package.json | 4 ++-- packages/blocto-sdk/CHANGELOG.md | 8 ++++++++ packages/blocto-sdk/package.json | 2 +- packages/dappauth/CHANGELOG.md | 7 +++++++ packages/dappauth/package.json | 2 +- 19 files changed, 72 insertions(+), 42 deletions(-) delete mode 100644 .changeset/curvy-students-trade.md delete mode 100644 .changeset/funny-elephants-thank.md delete mode 100644 .changeset/gorgeous-hairs-yell.md delete mode 100644 .changeset/new-brooms-refuse.md delete mode 100644 .changeset/six-foxes-add.md create mode 100644 packages/dappauth/CHANGELOG.md diff --git a/.changeset/curvy-students-trade.md b/.changeset/curvy-students-trade.md deleted file mode 100644 index 25e154fa..00000000 --- a/.changeset/curvy-students-trade.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@blocto/sdk': patch ---- - -adjust eth_accounts to not require prior enable diff --git a/.changeset/funny-elephants-thank.md b/.changeset/funny-elephants-thank.md deleted file mode 100644 index c9f77fb8..00000000 --- a/.changeset/funny-elephants-thank.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@blocto/connectkit-connector': patch -'@blocto/rainbowkit-connector': patch -'@blocto/web3-react-connector': patch -'@blocto/web3modal-connector': patch -'@blocto/wagmi-connector': patch -'@blocto/sdk': patch ---- - -Fix export unreconize type for old typescript diff --git a/.changeset/gorgeous-hairs-yell.md b/.changeset/gorgeous-hairs-yell.md deleted file mode 100644 index 4f2bd1a9..00000000 --- a/.changeset/gorgeous-hairs-yell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@blocto/web3-react-connector': patch ---- - -refactor: adjust web3-react-connector's activate method to comply with @blocto/sdk's changes diff --git a/.changeset/new-brooms-refuse.md b/.changeset/new-brooms-refuse.md deleted file mode 100644 index f432d1db..00000000 --- a/.changeset/new-brooms-refuse.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@blocto/dappauth': minor ---- - -restructure @blocto/dappauth and using rollup bundle diff --git a/.changeset/six-foxes-add.md b/.changeset/six-foxes-add.md deleted file mode 100644 index eded4a4b..00000000 --- a/.changeset/six-foxes-add.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@blocto/sdk': patch ---- - -AccountChange use addSelfRemovableHandler diff --git a/adapters/connectkit-connector/CHANGELOG.md b/adapters/connectkit-connector/CHANGELOG.md index e95bf6cc..ff4e06c0 100644 --- a/adapters/connectkit-connector/CHANGELOG.md +++ b/adapters/connectkit-connector/CHANGELOG.md @@ -1,5 +1,13 @@ # @blocto/connectkit-connector +## 0.2.1 + +### Patch Changes + +- 4835522: Fix export unreconize type for old typescript +- Updated dependencies [4835522] + - @blocto/wagmi-connector@1.2.2 + ## 0.2.0 ### Minor Changes diff --git a/adapters/connectkit-connector/package.json b/adapters/connectkit-connector/package.json index f7d998eb..df7edc56 100644 --- a/adapters/connectkit-connector/package.json +++ b/adapters/connectkit-connector/package.json @@ -2,7 +2,7 @@ "name": "@blocto/connectkit-connector", "description": "blocto wallet connector to use with connectkit", "author": "Blocto Wallet", - "version": "0.2.0", + "version": "0.2.1", "type": "module", "main": "./dist/index.umd.cjs", "module": "./dist/index.js", @@ -30,7 +30,7 @@ "/dist" ], "dependencies": { - "@blocto/wagmi-connector": "^1.2.1" + "@blocto/wagmi-connector": "^1.2.2" }, "peerDependencies": { "connectkit": "^1.5.3", diff --git a/adapters/rainbowkit-connector/CHANGELOG.md b/adapters/rainbowkit-connector/CHANGELOG.md index 1123f8d2..88ce0272 100644 --- a/adapters/rainbowkit-connector/CHANGELOG.md +++ b/adapters/rainbowkit-connector/CHANGELOG.md @@ -1,5 +1,13 @@ # @blocto/rainbowkit-connector +## 0.2.7 + +### Patch Changes + +- 4835522: Fix export unreconize type for old typescript +- Updated dependencies [4835522] + - @blocto/wagmi-connector@1.2.2 + ## 0.2.6 ### Patch Changes diff --git a/adapters/rainbowkit-connector/package.json b/adapters/rainbowkit-connector/package.json index 2d49b2d1..ba7cbdfa 100644 --- a/adapters/rainbowkit-connector/package.json +++ b/adapters/rainbowkit-connector/package.json @@ -1,6 +1,6 @@ { "name": "@blocto/rainbowkit-connector", - "version": "0.2.6", + "version": "0.2.7", "description": "blocto wallet connector to use rainbowkit", "author": "Blocto Wallet", "main": "./dist/index.js", @@ -34,7 +34,7 @@ }, "dependencies": { "@rainbow-me/rainbowkit": "^1.0.8", - "@blocto/wagmi-connector": "^1.2.1" + "@blocto/wagmi-connector": "^1.2.2" }, "devDependencies": { "@types/jest": "^29.5.2", diff --git a/adapters/wagmi-connector/CHANGELOG.md b/adapters/wagmi-connector/CHANGELOG.md index 14caa29b..81086bea 100644 --- a/adapters/wagmi-connector/CHANGELOG.md +++ b/adapters/wagmi-connector/CHANGELOG.md @@ -1,5 +1,15 @@ # @blocto/wagmi-connector +## 1.2.2 + +### Patch Changes + +- 4835522: Fix export unreconize type for old typescript +- Updated dependencies [58ef7a0] +- Updated dependencies [4835522] +- Updated dependencies [e742f66] + - @blocto/sdk@0.7.1 + ## 1.2.1 ### Patch Changes diff --git a/adapters/wagmi-connector/package.json b/adapters/wagmi-connector/package.json index c69e929c..31a1ff9a 100644 --- a/adapters/wagmi-connector/package.json +++ b/adapters/wagmi-connector/package.json @@ -2,7 +2,7 @@ "name": "@blocto/wagmi-connector", "description": "Blocto wallet connector extend from wagmi Connector", "author": "Calvin Chang", - "version": "1.2.1", + "version": "1.2.2", "type": "module", "main": "./dist/index.umd.cjs", "module": "./dist/index.js", @@ -28,7 +28,7 @@ "/dist" ], "dependencies": { - "@blocto/sdk": "^0.7.0" + "@blocto/sdk": "^0.7.1" }, "peerDependencies": { "@wagmi/core": ">=1", diff --git a/adapters/web3-react-connector/CHANGELOG.md b/adapters/web3-react-connector/CHANGELOG.md index de3887ae..fb714cdf 100644 --- a/adapters/web3-react-connector/CHANGELOG.md +++ b/adapters/web3-react-connector/CHANGELOG.md @@ -1,5 +1,16 @@ # @blocto/web3-react-connector +## 1.0.3 + +### Patch Changes + +- 4835522: Fix export unreconize type for old typescript +- 1d05082: refactor: adjust web3-react-connector's activate method to comply with @blocto/sdk's changes +- Updated dependencies [58ef7a0] +- Updated dependencies [4835522] +- Updated dependencies [e742f66] + - @blocto/sdk@0.7.1 + ## 1.0.2 ### Patch Changes diff --git a/adapters/web3-react-connector/package.json b/adapters/web3-react-connector/package.json index 33b50231..e9632eb8 100644 --- a/adapters/web3-react-connector/package.json +++ b/adapters/web3-react-connector/package.json @@ -1,6 +1,6 @@ { "name": "@blocto/web3-react-connector", - "version": "1.0.2", + "version": "1.0.3", "description": "A Blocto SDK connector for web3-react", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -43,7 +43,7 @@ "url": "git://github.com/portto/blocto-sdk.git" }, "dependencies": { - "@blocto/sdk": "^0.7.0", + "@blocto/sdk": "^0.7.1", "@web3-react/types": "^8.1.2-beta.0" }, "devDependencies": { diff --git a/adapters/web3modal-connector/CHANGELOG.md b/adapters/web3modal-connector/CHANGELOG.md index 34e93f95..2f3a5663 100644 --- a/adapters/web3modal-connector/CHANGELOG.md +++ b/adapters/web3modal-connector/CHANGELOG.md @@ -1,5 +1,13 @@ # @blocto/web3modal-connector +## 0.1.2 + +### Patch Changes + +- 4835522: Fix export unreconize type for old typescript +- Updated dependencies [4835522] + - @blocto/wagmi-connector@1.2.2 + ## 0.1.1 ### Patch Changes diff --git a/adapters/web3modal-connector/package.json b/adapters/web3modal-connector/package.json index 9b4cd7c4..7bdfeba9 100644 --- a/adapters/web3modal-connector/package.json +++ b/adapters/web3modal-connector/package.json @@ -2,7 +2,7 @@ "name": "@blocto/web3modal-connector", "description": "Blocto connector extend from wagmi Connector to use with web3modal", "author": "Blocto Wallet", - "version": "0.1.1", + "version": "0.1.2", "type": "module", "main": "./dist/index.umd.cjs", "module": "./dist/index.js", @@ -41,6 +41,6 @@ "/dist" ], "dependencies": { - "@blocto/wagmi-connector": "^1.2.1" + "@blocto/wagmi-connector": "^1.2.2" } } diff --git a/packages/blocto-sdk/CHANGELOG.md b/packages/blocto-sdk/CHANGELOG.md index c89a5388..9add1e3a 100644 --- a/packages/blocto-sdk/CHANGELOG.md +++ b/packages/blocto-sdk/CHANGELOG.md @@ -1,5 +1,13 @@ # @blocto/sdk +## 0.7.1 + +### Patch Changes + +- 58ef7a0: adjust eth_accounts to not require prior enable +- 4835522: Fix export unreconize type for old typescript +- e742f66: AccountChange use addSelfRemovableHandler + ## 0.7.0 ### Minor Changes diff --git a/packages/blocto-sdk/package.json b/packages/blocto-sdk/package.json index 1c58832d..bf3fe42d 100644 --- a/packages/blocto-sdk/package.json +++ b/packages/blocto-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@blocto/sdk", - "version": "0.7.0", + "version": "0.7.1", "repository": "git@github.com:portto/blocto-sdk.git", "author": "Chiaki.C", "license": "MIT", diff --git a/packages/dappauth/CHANGELOG.md b/packages/dappauth/CHANGELOG.md new file mode 100644 index 00000000..60e622bc --- /dev/null +++ b/packages/dappauth/CHANGELOG.md @@ -0,0 +1,7 @@ +# @blocto/dappauth + +## 2.2.0 + +### Minor Changes + +- 5ae0ff0: restructure @blocto/dappauth and using rollup bundle diff --git a/packages/dappauth/package.json b/packages/dappauth/package.json index 4a45d834..d763e14b 100644 --- a/packages/dappauth/package.json +++ b/packages/dappauth/package.json @@ -1,6 +1,6 @@ { "name": "@blocto/dappauth", - "version": "2.1.0", + "version": "2.2.0", "description": "A util to prove actionable control ('ownership') over a public Ethereum address using eth_sign", "keywords": [ "ethereum",