Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use transaction type 0 for currencies which do not support EIP-1559 #665

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- fixed: Use transaction type 0 (legacy transactions) currencies which do no support EIP-1559

## 2.11.0 (2023-11-08)

- added: Add THORChain (RUNE)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/EthereumEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,7 @@ export class EthereumEngine extends CurrencyEngine<
const common = Common.custom(chainParams)

// Translate legacy transaction types to EIP-1559 transaction type
const txType = this.networkInfo.supportsEIP1559 === true ? 2 : 1
const txType = this.networkInfo.supportsEIP1559 === true ? 2 : 0
// Translate legacy transaction types gas params to to EIP-1559 params
const gasFeeParams = await getFeeParamsByTransactionType(
txType,
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/fees/ethMiningFees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export async function getFeeParamsByTransactionType(
gasPrice: string,
fetchBaseFeePerGas: () => Promise<string | undefined>
): Promise<GasParams> {
if (transactionType === 1) {
if (transactionType < 2) {
return { gasPrice }
} else {
const baseFeePerGas = await fetchBaseFeePerGas()
Expand Down
Loading