Skip to content

Commit

Permalink
cbw sdk version bump (#3997)
Browse files Browse the repository at this point in the history
* bump

* install

* add changeset

* hex to number conversion

* Update packages/connectors/src/coinbaseWallet.ts

Co-authored-by: jxom  <j@wevm.dev>

* Update packages/connectors/src/coinbaseWallet.ts

Co-authored-by: jxom  <j@wevm.dev>

* rmv unused import

* chore: tweaks

---------

Co-authored-by: jxom <j@wevm.dev>
Co-authored-by: Tom Meagher <tom@meagher.co>
  • Loading branch information
3 people committed Jun 2, 2024
1 parent 30bfa2e commit c1952d1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/popular-files-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wagmi/connectors": patch
---

Bumped Coinbase Wallet SDK.
2 changes: 1 addition & 1 deletion packages/connectors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
},
"dependencies": {
"@coinbase/wallet-sdk": "4.0.2",
"@coinbase/wallet-sdk": "4.0.3",
"@metamask/sdk": "0.20.3",
"@safe-global/safe-apps-provider": "0.18.1",
"@safe-global/safe-apps-sdk": "8.1.0",
Expand Down
7 changes: 5 additions & 2 deletions packages/connectors/src/coinbaseWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type {
} from 'cbw-sdk'
import {
type AddEthereumChainParameter,
type Hex,
type ProviderRpcError,
SwitchChainError,
UserRejectedRequestError,
Expand Down Expand Up @@ -162,7 +163,7 @@ function version4(parameters: Version4Parameters) {
},
async getChainId() {
const provider = await this.getProvider()
const chainId = await provider.request<number>({
const chainId = await provider.request<Hex>({
method: 'eth_chainId',
})
return Number(chainId)
Expand Down Expand Up @@ -399,7 +400,9 @@ function version3(parameters: Version3Parameters) {
},
async getChainId() {
const provider = await this.getProvider()
const chainId = await provider.request<number>({ method: 'eth_chainId' })
const chainId = await provider.request<Hex>({
method: 'eth_chainId',
})
return Number(chainId)
},
async getProvider() {
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c1952d1

Please sign in to comment.