Description
Hey Community...Trying to migrate v1 react-native dapp implementation to v2 in my react-native application. When trying to migrate "sendTransation" call from V1 to "provider.request" in V2, getting JSON-RPC error from metamask. The v1 version is working correctly so I am assuming its not an issue with metamask. No params have changed just the function. Please help me out.
import {
WalletConnectModal,
useWalletConnectModal,
} from '@walletconnect/modal-react-native';
const connector = useWalletConnectModal();
//----------V1 Version start--------------------//
connector.sendTransaction({
data: encodedData,
from: account,
to: tokenAddress,
nonce,
maxFee: 1573479400382,
maxPriorityFee: 115446958670,
})
//----------V1 Version End--------------------//
//----------V2 Version Start------------------//
connector?.provider
?.request({
method: 'eth_sendTransaction',
params: [{
data: encodedData,
from: account,
to: tokenAddress,
nonce,
maxFee: 1573479400382,
maxPriorityFee: 115446958670,
},
],
})
//----------V2 Version End--------------------//
Error from Metamask: {"code": -32603, "message": "Internal error"}
WalletConnect Modal SDK version
1.0.0-rc.2
Output of npx react-native info
System:
OS: Linux 6.2 Pop!_OS 22.04 LTS
CPU: (8) x64 AMD Ryzen 5 2400G with Radeon Vega Graphics
Memory: 1.72 GB / 13.58 GB
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 18.14.2 - ~/.nvm/versions/node/v18.14.2/bin/node
Yarn: Not Found
npm: 9.6.2 - ~/Developer/professional/wakanda/node_modules/.bin/npm
Watchman: 4.9.0 - /usr/bin/watchman
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java: 11.0.18 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
npmGlobalPackages:
react-native: Not Found
Expo Version (if applies)
No response
Steps to reproduce
import {
WalletConnectModal,
useWalletConnectModal,
} from '@walletconnect/modal-react-native';
const connector = useWalletConnectModal();
//----------V1 Version start--------------------//
connector.sendTransaction({
data: encodedData,
from: account,
to: tokenAddress,
nonce,
maxFee: 1573479400382,
maxPriorityFee: 115446958670,
})
//----------V1 Version End--------------------//
//----------V2 Version Start------------------//
connector?.provider
?.request({
method: 'eth_sendTransaction',
params: [{
data: encodedData,
from: account,
to: tokenAddress,
nonce,
maxFee: 1573479400382,
maxPriorityFee: 115446958670,
},
],
})
//----------V2 Version End--------------------//
Error from Metamask: {"code": -32603, "message": "Internal error"}
Snack, code example, screenshot, or link to a repository

Description
Hey Community...Trying to migrate v1 react-native dapp implementation to v2 in my react-native application. When trying to migrate "sendTransation" call from V1 to "provider.request" in V2, getting JSON-RPC error from metamask. The v1 version is working correctly so I am assuming its not an issue with metamask. No params have changed just the function. Please help me out.
Error from Metamask: {"code": -32603, "message": "Internal error"}
WalletConnect Modal SDK version
1.0.0-rc.2
Output of
npx react-native infoSystem:
OS: Linux 6.2 Pop!_OS 22.04 LTS
CPU: (8) x64 AMD Ryzen 5 2400G with Radeon Vega Graphics
Memory: 1.72 GB / 13.58 GB
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 18.14.2 - ~/.nvm/versions/node/v18.14.2/bin/node
Yarn: Not Found
npm: 9.6.2 - ~/Developer/professional/wakanda/node_modules/.bin/npm
Watchman: 4.9.0 - /usr/bin/watchman
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java: 11.0.18 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
npmGlobalPackages:
react-native: Not Found
Expo Version (if applies)
No response
Steps to reproduce
Error from Metamask: {"code": -32603, "message": "Internal error"}
Snack, code example, screenshot, or link to a repository