MetaMask / MetaMask/metamask-extension

How to specify default `Max Priority Fee` for custom network

Open
#13,261 7 comments 0 reactions 0 assignees View on GitHub
area-customNetworks area-gas EIP-1559 type-discussion
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

Hi, I searched issues and stackexchange but couldn't find a solution, any help would be appreciated!

## Describe the issue
when sending token with a custom network that has custom RPC methods implementation , I can see that Metamask fetches:
- max fee by `eth_gasPrice`
- gas limit by `eth_estimateGas`.
- max priority fee: ??

However, I was not able to figure out how metamask determines the default `Max Priority Fee`, which is currently the same as gas limit.

## Expected behavior
I hope to be able to set a default `Max Priority Fee` value (such as 1.5), either by hardcoding it somewhere, or deriving it from any RPC calls (I can customize any RPC calls for this network).

## Screenshots
from the screenshot we can see that after clicking `send` and `Next`, on the gas settings page, `max priority fee` is the same as `max fee`
Screen Shot 2022-01-10 at 18 11 09

## Browser details
- OS: OS X
- Browser: Chrome
- MetaMask Version: 10.8.1

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by tracing the custom-network transaction fee flow and the eth_gasPrice and eth_estimateGas entry points, then identify how max priority fee is currently selected. Done means a custom network can provide or configure a default max priority fee without making it equal to the max fee.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, blockchain
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.