From 67b64e10bf0f07b12861720eecdb5abbca43ddb0 Mon Sep 17 00:00:00 2001 From: rileystephens28 Date: Mon, 14 Oct 2024 15:02:42 -0500 Subject: [PATCH] Update/remove comments --- src/hash/typed-data.ts | 1 - src/providers/provider.ts | 12 ++++-------- src/wallet/qi-hdwallet.ts | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/hash/typed-data.ts b/src/hash/typed-data.ts index 7986e5ff..530dbf8a 100644 --- a/src/hash/typed-data.ts +++ b/src/hash/typed-data.ts @@ -1,4 +1,3 @@ -//import { TypedDataDomain, TypedDataField } from "@quaisproject/providerabstract-signer"; import { getAddress } from '../address/index.js'; import { keccak256 } from '../crypto/index.js'; import { recoverAddress } from '../address/index.js'; diff --git a/src/providers/provider.ts b/src/providers/provider.ts index 5e1b3450..efe737c9 100644 --- a/src/providers/provider.ts +++ b/src/providers/provider.ts @@ -197,14 +197,12 @@ export interface QuaiTransactionRequest { gasLimit?: null | BigNumberish; /** - * The gas price to use for legacy transactions or transactions on legacy networks. - * - * Most of the time the `max*FeePerGas` is preferred. + * The gas price to use for the transaction. */ gasPrice?: null | BigNumberish; /** - * The [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) maximum priority fee to pay per gas. + * The tip to paid directly to the miner of the transaction. */ minerTip?: null | BigNumberish; @@ -310,14 +308,12 @@ export interface QuaiPreparedTransactionRequest { gasLimit?: bigint; /** - * The gas price to use for legacy transactions or transactions on legacy networks. - * - * Most of the time the `max*FeePerGas` is preferred. + * The gas price to use for the transaction. */ gasPrice?: bigint; /** - * The [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) maximum priority fee to pay per gas. + * The fee paid directly to the miner of the transaction. */ minerTip?: bigint; diff --git a/src/wallet/qi-hdwallet.ts b/src/wallet/qi-hdwallet.ts index 966137c0..e0aca94f 100644 --- a/src/wallet/qi-hdwallet.ts +++ b/src/wallet/qi-hdwallet.ts @@ -451,7 +451,7 @@ export class QiHDWallet extends AbstractHDWallet { const gasLimit = await this.provider.estimateGas(tx); const feeData = await this.provider.getFeeData(originZone, false); - // Calculate total fee for the transaction + // 5.6 Calculate total fee for the transaction using the gasLimit, gasPrice, and minerTip const totalFee = gasLimit * (feeData.gasPrice ?? 1n) + gasLimit * (feeData.minerTip ?? 0n); // Get new selection with fee