Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/wagmi-dev/viem into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Sep 8, 2023
2 parents 2579281 + 4685699 commit 7f1957d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# viem

## 1.10.8

### Patch Changes

- [#1177](https://github.com/wagmi-dev/viem/pull/1177) [`8d05e410`](https://github.com/wagmi-dev/viem/commit/8d05e410e1db43cbcddab2741e1f7dc22b5ffbec) Thanks [@jxom](https://github.com/jxom)! - Fixed an issue where some environments would throw `WebSocket.default is not a constructor`.

## 1.10.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "viem",
"description": "TypeScript Interface for Ethereum",
"version": "1.10.7",
"version": "1.10.8",
"scripts": {
"bench": "vitest bench",
"bench:ci": "CI=true vitest bench",
Expand Down
2 changes: 1 addition & 1 deletion src/errors/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = '1.10.6'
export const version = '1.10.8'
4 changes: 3 additions & 1 deletion src/utils/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ export async function getSocket(url: string) {
const { schedule } = createBatchScheduler<undefined, [Socket]>({
id: url,
fn: async () => {
const webSocket = new WebSocket(url)
let WebSocket_ = WebSocket
if (!WebSocket.constructor) WebSocket_ = WebSocket.WebSocket
const webSocket = new WebSocket_(url)

// Set up a cache for incoming "synchronous" requests.
const requests = new Map<Id, CallbackFn>()
Expand Down

0 comments on commit 7f1957d

Please sign in to comment.