Skip to content

Commit

Permalink
Use transaction type 0 for currencies which do not support EIP-1559
Browse files Browse the repository at this point in the history
  • Loading branch information
samholmes committed Nov 9, 2023
1 parent c98ca8e commit 63ed43a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
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

0 comments on commit 63ed43a

Please sign in to comment.