Skip to content

Commit 270dce0

Browse files
authored
Merge branch 'main' into patch/intercom-fallback-appid
2 parents f8e88ca + 1d027c7 commit 270dce0

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

e2e/specs/stateless/ownership.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,8 @@ test.describe('Extend name', () => {
11751175
await extendNamesModal.getExtendButton.click()
11761176
await transactionModal.autoComplete()
11771177
const newTimestamp = await ownershipPage.getExpiryTimestamp()
1178-
expect(newTimestamp).toEqual(timestamp + 31536000000)
1178+
// Allow 1 day tolerance for leap year differences
1179+
expect(Math.abs(newTimestamp - timestamp - 31536000000)).toBeLessThanOrEqual(86400000)
11791180
})
11801181
})
11811182
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"@ensdomains/content-hash": "^3.0.0-beta.5",
5959
"@ensdomains/ens-contracts": "1.6.0",
6060
"@ensdomains/ens-test-env": "1.0.1",
61-
"@ensdomains/ensjs": "https://pkg.pr.new/ensdomains/ensjs/@ensdomains/ensjs@deab43b",
61+
"@ensdomains/ensjs": "^4.2.2",
6262
"@ensdomains/thorin": "1.0.0-beta.28",
6363
"@getpara/rainbowkit": "1.4.0",
6464
"@getpara/rainbowkit-wallet": "1.4.0",

pnpm-lock.yaml

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/query/wagmi.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
type TransactionType,
1111
type Transport,
1212
} from 'viem'
13-
import { createConfig, createStorage, fallback, http } from 'wagmi'
13+
import { createConfig, createStorage, fallback, http, webSocket } from 'wagmi'
1414
import { localhost, mainnet, sepolia } from 'wagmi/chains'
1515

1616
import { ccipRequest } from '@ensdomains/ensjs/utils'
@@ -53,17 +53,17 @@ export const drpcUrl = (chainName: string) =>
5353
chainName === 'mainnet' ? 'ethereum' : chainName
5454
}&dkey=${drpcKey}`
5555

56-
type SupportedUrlFunc = typeof drpcUrl | typeof tenderlyUrl
57-
58-
const initialiseTransports = <const UrlFuncArray extends SupportedUrlFunc[]>(
59-
chainName: string,
60-
urlFuncArray: UrlFuncArray,
61-
) => {
62-
const transportArray: HttpTransport[] = []
63-
64-
for (const urlFunc of urlFuncArray) transportArray.push(http(urlFunc(chainName)))
56+
export const drpcWsUrl = (chainName: string) =>
57+
`wss://lb.drpc.org/ogws?network=${
58+
chainName === 'mainnet' ? 'ethereum' : chainName
59+
}&dkey=${drpcKey}`
6560

66-
return fallback(transportArray)
61+
const initialiseTransports = (chainName: string) => {
62+
return fallback([
63+
webSocket(drpcWsUrl(chainName)), // Primary: instant block updates via subscription
64+
http(drpcUrl(chainName)), // Fallback 1: DRPC HTTP
65+
http(tenderlyUrl(chainName)), // Fallback 2: Tenderly HTTP
66+
])
6767
}
6868

6969
export const prefix = 'wagmi'
@@ -109,8 +109,8 @@ export const transports = {
109109
// this is a hack to make the types happy, dont remove pls
110110
[localhost.id]: HttpTransport
111111
})),
112-
[mainnet.id]: initialiseTransports('mainnet', [drpcUrl, tenderlyUrl]),
113-
[sepolia.id]: initialiseTransports('sepolia', [drpcUrl, tenderlyUrl]),
112+
[mainnet.id]: initialiseTransports('mainnet'),
113+
[sepolia.id]: initialiseTransports('sepolia'),
114114
} as const
115115

116116
// This is a workaround to fix MetaMask defaulting to the wrong transaction type

0 commit comments

Comments
 (0)