Comments (6)
shouldn't this issue be linked inside viem repo, as it was originally? The bug seems to be related to viem/actions
which are part of viem repo. In the getClient.test-d.ts
I need to write code like below to recreate the issue
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…' })
})
from wagmi.
using client.waitForTransactionReceipt
works fine (might be the intended usage?)
from wagmi.
If anyone wants to look into this, this is the test that you need to pass:
getClient.test-d.ts
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…' })
})
from wagmi.
shouldn't this issue be linked inside viem repo, as it was originally?
It could, but it's less likely that Viem will have a client with a chain union for client.chain
. In this case, getClient
returns a client with client.chain: typeof arbitrumNova | typeof optimism
. Seems like the move is to solve this downstream of Viem in getClient.test-d.ts
first (since Wagmi should have type coverage for this scenario), then update Viem if necessary.
from wagmi.
@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 @wagmi/core
usage in favour of consuming the actions from a client instead
from wagmi.
@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
@wagmi/core
usage in favour of consuming the actions from a client instead
refactored out our @wagmi/core usage in favour of consuming actions via public/wallet clients instead, i'd been meaning to do that anyways
from wagmi.
Related Issues (20)
- Mock connector not able to send transaction? HOT 2
- Injected connector: multiple addresses connection mismatches currently selected account HOT 1
- Depending on vulnerable package caused by mipd 0.0.5 HOT 5
- Depending on vulnerable package ws 8.13.0 HOT 4
- Error: connector.getChainId is not a function HOT 1
- Wagmi cli foundry plugin defaultExcludes list is replaced when specified HOT 2
- create wagmi templates don't work HOT 2
- Cant swap MATIC using 0x and polygon HOT 2
- WalletConnect modal does not appear when using a fallback to `unstable_connector(injected)` HOT 1
- Unable to create a type safe abstraction that runs simulation and exposes a write function
- Missing type in ConnectErrorType when using connect method from useConnect HOT 2
- useWriteContract cannot return hash normally when using wallet-connect connector HOT 4
- Using metaMask connector results in TypeError HOT 2
- Wrong connect status of useAccount with Rabby HOT 6
- EIP-1193 auto-injected connector connections don't persist on page refresh if previously disconnected with ssr enabled HOT 1
- Typedef of serialize/deserialize in createStorage is forcing serialization
- Viem has a [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas) action (PR welcome to add the Wagmi Action/Hook). You can use that or you can encode the contract data and pass it to `useEstimateGas`. HOT 3
- `WagmiProviderNotFoundError` for hooks generated by `@wagmi/cli` in monorepo HOT 1
- useBalance use too many request to get balance. Do you plan for supporting get balance for multiple tokens? HOT 1
- Cannot switch chains on mobile when using MetaMask HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wagmi.