-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: waitForTransactionReceipt doesn't accept client with multiple possible chains #3635
Comments
using |
If anyone wants to look into this, this is the test that you need to pass:
test('behavior: viem actions', () => {
const config = createConfig({
chains: [arbitrumNova, optimism],
transports: {
[arbitrumNova.id]: http(),
[optimism.id]: http(),
},
})
const client = getClient(config)
waitForTransactionReceipt(client, { hash: '0x…' })
}) |
shouldn't this issue be linked inside viem repo, as it was originally? The bug seems to be related to import { chain, config } from '@wagmi/test'
import { expectTypeOf, test } from 'vitest'
import { http } from 'viem'
import { waitForTransactionReceipt } from 'viem/actions'
import { createConfig } from '../createConfig.js'
import { arbitrumNova, optimism } from '../exports/chains.js'
import { getClient } from './getClient.js'
test('behavior: viem actions', () => {
const config = createConfig({
chains: [arbitrumNova, optimism],
transports: {
[arbitrumNova.id]: http(),
[optimism.id]: http(),
},
})
const client = getClient(config)
waitForTransactionReceipt(client, { hash: '0x…' })
}) |
It could, but it's less likely that Viem will have a client with a chain union for |
@tmm it looks like in #3929 you're gonna take this on as part of a larger refactor is there a rough timeline on when it might land? we need to bump wagmi to pull in a coinbase wallet fix on Zora, if there's a rough timeline it'll help me decide whether to wait or to refactor some |
refactored out our @wagmi/core usage in favour of consuming actions via public/wallet clients instead, i'd been meaning to do that anyways |
Is there an existing issue for this?
Package Version
2.7.13
Current Behavior
Expected Behavior
No response
Steps To Reproduce
No response
Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)
https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbwBYxmAvnAZlCI4DkAbsAKYgEBQoksiA7gIbAwBi0AKlIwHYDOjAMYxgEHgCVSg0sDAxMOPIRLkA9EJFi+VGtHgJGUAEYsoAVxAA5CEUYAaOBDmhgfEAtz5iZEKsFJmfh1wPUQzPlIABTMjABtgQQBheNIeeWxPQiYAcxBgYNp9QShSRhhSRLEsYGyPJQIAARy8v2hSKkpBLXh-QL44AF44AG1DExhzKxt7R2c8twBdOEZ+rv4YTu64Cd4+Qv6hhEo4EbHTC2tbADpgABMFgC44FDQACgAid4BKO2ORpxE8xAN3uTxeYA+30omBWcDWfA2m3WcKqNUGiD+vWA-F+Jx2-H20OWq26lEoMAAnmBSHBKjxqtl0ZIYGYoDwOFTSAAeP6U6kQLBwkplCqo7I8k4nV580gClH0mpfYYELFBBa4yXSzlytYMpUEfF7PTaBZ-AB8lAtZKwZh4wlEPDg4VIAAlSLFYhBXl8MSd4T0Uml0c7onEEskyGkuXSGWbvWSTkwWOwoFxdhoHZJpLIYK9BIGYA5kCskE93gAGAAe73QX2hQA
Anything else?
No response
The text was updated successfully, but these errors were encountered: