From c6fbd6081676d96cca182b45ec9099be090e3af3 Mon Sep 17 00:00:00 2001 From: gregfromstl Date: Mon, 7 Oct 2024 19:11:21 +0000 Subject: [PATCH] [SDK] Fix: pass gasPrice to injected provider (#4935) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## PR-Codex overview This PR introduces the handling of `gasPrice` in the transaction object within the `injected` wallet module. ### Detailed summary - Added a new line to handle `gasPrice` in the transaction object. - The `gasPrice` is conditionally converted to hexadecimal format using `numberToHex` if it exists. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- packages/thirdweb/src/wallets/injected/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/thirdweb/src/wallets/injected/index.ts b/packages/thirdweb/src/wallets/injected/index.ts index 678d8729aac..9dd6bc7d877 100644 --- a/packages/thirdweb/src/wallets/injected/index.ts +++ b/packages/thirdweb/src/wallets/injected/index.ts @@ -120,6 +120,7 @@ function createAccount(provider: Ethereum, _address: string) { accessList: tx.accessList, value: tx.value ? numberToHex(tx.value) : undefined, gas: tx.gas ? numberToHex(tx.gas) : undefined, + gasPrice: tx.gasPrice ? numberToHex(tx.gasPrice) : undefined, from: this.address, to: tx.to as Address, data: tx.data,