Skip to content

Commit 3ae7727

Browse files
committed
Fix snowflakeUrls
1 parent dacae16 commit 3ae7727

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

site/pages/docs/clients/transports/http.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const client = createPublicClient({
7171
chain: mainnet,
7272
transport: http({
7373
tor: { // [!code focus:4]
74-
snowflakeUrl: 'https://snowflake.pse.dev/',
74+
snowflakeUrl: 'wss://snowflake.pse.dev/',
7575
filter: ['eth_sendRawTransaction'],
7676
},
7777
}),
@@ -296,7 +296,7 @@ import { http } from 'viem'
296296
// ---cut---
297297
const transport = http('https://1.rpc.thirdweb.com/...', {
298298
tor: { // [!code focus:4]
299-
snowflakeUrl: 'https://snowflake.pse.dev/',
299+
snowflakeUrl: 'wss://snowflake.pse.dev/',
300300
filter: ['eth_sendRawTransaction'],
301301
},
302302
})

src/clients/transports/http.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ describe('tor support', () => {
608608
const transport = http('https://mockapi.com/rpc', {
609609
fetchFn: mockRegularFetch.fetch,
610610
tor: {
611-
snowflakeUrl: 'https://snowflake.example.com/',
611+
snowflakeUrl: 'wss://snowflake.example.com/',
612612
filter: ['eth_getBalance', 'eth_sendTransaction'], // Only these methods use Tor
613613
sharedClient: mockTorFetch as any,
614614
},
@@ -643,7 +643,7 @@ describe('tor support', () => {
643643
const transport = http('https://mockapi.com/rpc', {
644644
fetchFn: mockRegularFetch.fetch,
645645
tor: {
646-
snowflakeUrl: 'https://snowflake.example.com/',
646+
snowflakeUrl: 'wss://snowflake.example.com/',
647647
filter: (body) => body.some((req) => req.method.includes('Balance')), // Function-based filter
648648
sharedClient: mockTorFetch as any,
649649
},
@@ -672,7 +672,7 @@ describe('tor support', () => {
672672
batch: true,
673673
fetchFn: mockRegularFetch.fetch,
674674
tor: {
675-
snowflakeUrl: 'https://snowflake.example.com/',
675+
snowflakeUrl: 'wss://snowflake.example.com/',
676676
filter: ['eth_getBalance'], // Only balance calls use Tor
677677
sharedClient: mockTorFetch as any,
678678
},
@@ -712,7 +712,7 @@ describe('tor support', () => {
712712

713713
const transport = http('https://mockapi.com/rpc', {
714714
tor: {
715-
snowflakeUrl: 'https://snowflake.example.com/',
715+
snowflakeUrl: 'wss://snowflake.example.com/',
716716
filter: ['eth_getBalance'],
717717
sharedClient: mockTorFetch as any,
718718
},

0 commit comments

Comments
 (0)