-
-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add EIP-1559 compatibility validation for transaction creation (#1693)
## Explanation This PR aims to include a validation existent in the Extension in the `TransactionController` core. The validation gets the current network and current account to check if they support EIP-1559 transactions. If the transaction is an EIP-1559 transaction, meaning it contains `maxFeePerGas` and `maxPriorityFeePerGas` values, but the network or account does not support EIP-1559, then an error is thrown. In order to support it two callbacks are passed to the controller constructor `getCurrentAccountEIP1559Compatibility` and `getCurrentNetworkEIP1559Compatibility`. ## Changelog ### `@metamask/transaction-controller` - **BREAKING**: Add required `getCurrentAccountEIP1559Compatibility` and `getCurrentNetworkEIP1559Compatibility` callback arguments to constructor.
- Loading branch information
1 parent
762882d
commit db2aef2
Showing
4 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters