Skip to content

Commit dd62d47

Browse files
committed
fix: should always contain gas price info even if it's 0
1 parent 485dcc6 commit dd62d47

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/thirdweb/src/wallets/in-app/core/wallet/enclave-wallet.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export class EnclaveWallet implements IWebWallet {
141141
const transaction: Record<string, Hex | number | undefined> = {
142142
to: tx.to ? getAddress(tx.to) : undefined,
143143
data: tx.data,
144-
value: typeof tx.value === "bigint" ? toHex(tx.value) : undefined,
144+
value: typeof tx.value === "bigint" ? toHex(tx.value) : toHex("0"),
145145
gas:
146146
typeof tx.gas === "bigint"
147147
? toHex(tx.gas + tx.gas / BigInt(10))
@@ -167,11 +167,11 @@ export class EnclaveWallet implements IWebWallet {
167167
transaction.maxPriorityFeePerGas =
168168
typeof tx.maxPriorityFeePerGas === "bigint"
169169
? toHex(tx.maxPriorityFeePerGas)
170-
: undefined;
170+
: toHex("0");
171171
transaction.type = 2;
172172
} else {
173173
transaction.gasPrice =
174-
typeof tx.gasPrice === "bigint" ? toHex(tx.gasPrice) : undefined;
174+
typeof tx.gasPrice === "bigint" ? toHex(tx.gasPrice) : toHex("0");
175175
transaction.type = 0;
176176
}
177177
return signEnclaveTransaction({

0 commit comments

Comments
 (0)