You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing an issue with the eth_sendTransaction method. When I run the demo project (migrate WalletConnectV2 to reown 1.2.1) on my device, the WalletConnect functionality works correctly, and the connection with different wallets, such as MetaMask, Trust Wallet, Rainbow Wallet, etc., is successfully established. However, when I try to send a transaction request using the eth_sendTransaction method, the functionality does not work as expected.
Specifically, the wallet app is opened via the AppKit.instance.launchCurrentWallet() method, but the transaction confirmation popup does not appear. I have tested this functionality with several wallets, including MetaMask, Trust Wallet, Rainbow Wallet, and others, but the issue persists across all of them.
Can you please guide me on what I might be doing wrong or provide suggestions on resolving this issue?
SDK Version
Client: Swift
Version Reown 1.2.1
Device (please complete the following information):
**Bug description **
I am facing an issue with the eth_sendTransaction method. When I run the demo project (migrate WalletConnectV2 to reown 1.2.1) on my device, the WalletConnect functionality works correctly, and the connection with different wallets, such as MetaMask, Trust Wallet, Rainbow Wallet, etc., is successfully established. However, when I try to send a transaction request using the eth_sendTransaction method, the functionality does not work as expected.
Specifically, the wallet app is opened via the AppKit.instance.launchCurrentWallet() method, but the transaction confirmation popup does not appear. I have tested this functionality with several wallets, including MetaMask, Trust Wallet, Rainbow Wallet, and others, but the issue persists across all of them.
Can you please guide me on what I might be doing wrong or provide suggestions on resolving this issue?
SDK Version
Device (please complete the following information):
** Here is my code **
let projectId = InputConfig.projectId
// ETH_SEND_TRANSACTION
Button("Send transaction") {
Task {
do {
try await calledRequest()
AppKit.instance.launchCurrentWallet()
} catch {
print("Error occurred: (error)")
}
}
}
private func calledRequest() async {
guard let session = AppKit.instance.getSessions().first else {
print("No active session")
return
}
let payLoad: [String: Any] = [
"from":AppKit.instance.getAddress() ?? "",
"to":"0xc771784564fa1de46a903887e78f5e8555cf6a7d",
"value":"0",
"data":"0x",
"nonce":"0x07",
"gasPrice":"0x0649534e00",
"gasLimit":"0x5208",
]
/// Also try with this method as well
//let payLoad: [String: Any] = [
// "from":AppKit.instance.getAddress() ?? "",
// "to":"0xc771784564fa1de46a903887e78f5e8555cf6a7d",
// "value":"0x",
// "data":"",
// "nonce":"0x07",
// "gasPrice":"0x0649534e00",
// "gasLimit":"0x5208",
// ]
//
// do {
// // Ensure chainId is properly formatted
// let formattedChainId = socketConnectionManager.chainId.contains("eip155:")
// ? socketConnectionManager.chainId
// : "eip155:(socketConnectionManager.chainId)"
// try await AppKit.instance.request(
// params: .init(
// topic: session.topic,
// method: "eth_sendTransaction",
// params: AnyCodable(any: payLoad),
// chainId: Blockchain(formattedChainId)!
// )
// )
//
// } catch {
// print("Error occurred during request: (error)")
// print("Detailed error: (String(describing: error))")
// }
}
The text was updated successfully, but these errors were encountered: