MetaMask / MetaMask/metamask-extension
[Bug]: Edit button is available when transfer is called
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
### Describe the bug
Hi I'm super new to developing web3 content at my job so it may just be a simple solution on my end but I'm seeing the edit button available when using the transfer function on an ECR-20 contract.
### Steps to reproduce
Using various libraries like ethers.js and @web3-onboard/core I get the provider and signer with the below code then generate a contract object to interact with, before attempting to transfer via the contract method.
`const makeTransactionRequest = async () => {
//Connect the wallet using the lib @web3-onboard/core
if (wallet === null) {
connectWallet();
return;
}
// Double check the chain is set correctly then get the provider and signer from the currently connected wallet
//use ethers to create a Web3Provider and contract object
await onboard.setChain({ chainId: 43113 });
const wallet_provider = wallet.provider;
const provider_web3 = new providers.Web3Provider(wallet_provider, 'any');
const signer = provider_web3.getSigner(connectedAddress);
const addressTo = process.env.toAddress;
let contract = new Contract(
ContractAddress,
FujiTestContract_ABI,
signer
);
let numberOfTokens = utils.parseUnits('.25', 18);
try {
const receipt = await contract.transfer(addressTo, numberOfTokens);
} catch (err) {
console.log(err)
}
};`

### Error messages or log output
_No response_
### Version
10.23.2
### Build type
None
### Browser
Chrome
### Operating system
Windows
### Hardware wallet
_No response_
### Additional context
_No response_
Contributor guide
Research direction
No repository file or test is named. Start by reproducing the transfer call in Chrome with MetaMask 10.23.2 on the Fuji test network, using the reported ethers.js setup and the makeTransactionRequest entry point; trace when the edit button is shown. Done means the transfer flow no longer exposes an edit action when it should be unavailable, with a regression test covering that state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100