Android studio: 2024.1.1 Patch 1
Testnet: hardhat (chain id 1337)
MetaMask Android SDK Version
0.6.6
MetaMask Mobile app Version
7.31.0
Android Version
14
Describe the Bug
Sending transaction with reterned by metamask sign returns error "Nonce too high. Expected nonce to be 0 but got 18". If I set the nonce value to zero, then I get an error such as "insufficient funds". But when I accept message signing in metamask app acitivity, I see my testnet and may test wallet account with 10k coins.
Besides, if I sign my transaction with web3j lib using wallet credentials, the transaction is proceeding successfully
It is very similar that metamask ignores the testnet I have chosen, and signs the transaction for the main network
Expected Behavior
To get the correct signature considering the selected testnet
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
Provide environment information
Android studio: 2024.1.1 Patch 1 Testnet: hardhat (chain id 1337)
MetaMask Android SDK Version
0.6.6
MetaMask Mobile app Version
7.31.0
Android Version
14
Describe the Bug
Sending transaction with reterned by metamask sign returns error "Nonce too high. Expected nonce to be 0 but got 18". If I set the nonce value to zero, then I get an error such as "insufficient funds". But when I accept message signing in metamask app acitivity, I see my testnet and may test wallet account with 10k coins. Besides, if I sign my transaction with web3j lib using wallet credentials, the transaction is proceeding successfully It is very similar that metamask ignores the testnet I have chosen, and signs the transaction for the main network
Expected Behavior
To get the correct signature considering the selected testnet
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/rainman-wf/Metamask_SDK_test.git
To Reproduce
Setup hadhat testnet with 1337 (0x539) chain id
Deploy simple solidity smart contract for raw transaction handling
Instal metamask app to android device
Add testnet to metamask app and select it as active
Add one of hardhat test accounts to metamask wallet
Make simple android project with metamask sdk implementation
Write function to create raw transaction signature
Implement connectSign function to get message signature
Sign transaction using returned by metamask signature
Push transaction to testnet