Dani Kovács
Dani Kovács

Reputation: 131

Web3 eth sendtransaction editable

I want to make an eth payment on my website. I'm using a simple sendtransaction. How can I hide the edit button? Or how can I make the transaction not editable?

image

Upvotes: 0

Views: 411

Answers (3)

Alex White
Alex White

Reputation: 1

It's just gas price edit button.

If you don't want to manually edit the gas price, you can set it in the Metamask: Settings -> Advanced -> Advanced gas controls, close it.

Upvotes: 0

Kendall Elmore
Kendall Elmore

Reputation: 9

I have been having the same issue and if you are dealing with any ERC-20 token it should have the "transfer" and "transferFrom" methods built into the contract. If you use "transfer" only 2 parameters are needed, toAddress and amount. transferFrom expects the previously mentioned fields as well as the an additional field, fromAddress. By using the transferFrom method you are giving the transaction all the information it needs to make a request so the user shouldnt need to edit the transaction.

https://ethereum.org/en/developers/docs/standards/tokens/erc-20/

Upvotes: 0

Petr Hejda
Petr Hejda

Reputation: 43561

The "edit" button is a non-configurable feature of the MetaMask browser extension.

So unless you can update the local copy of the MM code on each computer where you want the "edit" button to be hidden, there's no way to hide it.

Upvotes: 1

Related Questions