Open thezaidbintariq opened 3 weeks ago
Hey @thezaidbintariq that's probably an issue with Wagmi. How are you checking that the write contract is not being fired?
const {data, isPending, isSuccess, isError, writeContract} = useWriteContract();
did you check what is returned in data, isPending, isSuccess, isError
?
Description
I want to call a function on my smart contract for which I'm using wagmi's
useWriteContract
hook.The problem is the hook is not erroring out or firing the transaction. Since, there's no error in the console I'm unable to determine the problem. Attaching the code for the component below. Any help is appreciated :)
Issue Environment
Output of
npx react-native info
System: OS: macOS 15.0 CPU: (8) arm64 Apple M1 Pro Memory: 257.53 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 16.20.2 path: /opt/homebrew/opt/node@16/bin/node Yarn: version: 1.22.22 path: /opt/homebrew/bin/yarn npm: version: 8.19.4 path: /opt/homebrew/opt/node@16/bin/npm Watchman: version: 2024.08.05.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /Users/is-005/.rbenv/shims/pod SDKs: iOS SDK: Platforms:
info React Native v0.75.3 is now available (your project is running on v0.74.5). info Changelog: https://github.com/facebook/react-native/releases/tag/v0.75.3 info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.74.5 info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos"
Steps to reproduce
Snack, code example, screenshot, or link to a repository
https://github.com/thezaidbintariq/react-native-metamask