Skip to content

Commit a7c5bb0

Browse files
authored
Merge branch 'main' into 11-06-abstract_wallet_support
2 parents c044224 + 040e478 commit a7c5bb0

File tree

6 files changed

+42
-20
lines changed

6 files changed

+42
-20
lines changed

.changeset/eight-poems-end.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@thirdweb-dev/service-utils": patch
3+
---
4+
5+
Added nebula service scope

.changeset/serious-plants-play.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
fix enclave transaction signing for transactions with 0 maxPriorityFeePerGas

.github/workflows/linear.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
1919
echo "Pull Request Body: $pr_body"
2020
21-
if echo "$pr_body" | grep -iE "CNCT|DASH"; then
21+
if echo "$pr_body" | grep -iE "CNCT|DASH|BLOCK"; then
2222
echo "Linked issue found in the pull request body."
2323
else
2424
echo "No linked issue found in the pull request body."

apps/dashboard/src/components/settings/ApiKeys/validations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,4 +149,4 @@ export type ApiKeyPayConfigValidationSchema = z.infer<
149149
>;
150150

151151
// FIXME: Remove
152-
export const HIDDEN_SERVICES = ["relayer", "chainsaw"];
152+
export const HIDDEN_SERVICES = ["relayer", "chainsaw", "nebula"];

packages/service-utils/src/core/services.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ export const SERVICE_DEFINITIONS = {
6565
// all actions allowed
6666
actions: [],
6767
},
68+
nebula: {
69+
name: "nebula",
70+
title: "Nebula",
71+
description: "Nebula services",
72+
// all actions allowed
73+
actions: [],
74+
},
6875
} as const;
6976

7077
export const SERVICE_NAMES = Object.keys(

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

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -141,34 +141,39 @@ 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: tx.value ? toHex(tx.value) : undefined,
145-
gas: tx.gas ? toHex(tx.gas + tx.gas / BigInt(10)) : undefined, // Add a 10% buffer to gas
146-
nonce: tx.nonce
147-
? toHex(tx.nonce)
148-
: toHex(
149-
await import(
150-
"../../../../rpc/actions/eth_getTransactionCount.js"
151-
).then(({ eth_getTransactionCount }) =>
152-
eth_getTransactionCount(rpcRequest, {
153-
address: this.address,
154-
blockTag: "pending",
155-
}),
144+
value: typeof tx.value === "bigint" ? toHex(tx.value) : undefined,
145+
gas:
146+
typeof tx.gas === "bigint"
147+
? toHex(tx.gas + tx.gas / BigInt(10))
148+
: undefined, // Add a 10% buffer to gas
149+
nonce:
150+
typeof tx.nonce === "number"
151+
? toHex(tx.nonce)
152+
: toHex(
153+
await import(
154+
"../../../../rpc/actions/eth_getTransactionCount.js"
155+
).then(({ eth_getTransactionCount }) =>
156+
eth_getTransactionCount(rpcRequest, {
157+
address: this.address,
158+
blockTag: "pending",
159+
}),
160+
),
156161
),
157-
),
158162
chainId: toHex(tx.chainId),
159163
};
160164

161165
if (tx.maxFeePerGas) {
162166
transaction.maxFeePerGas = toHex(tx.maxFeePerGas);
163-
transaction.maxPriorityFeePerGas = tx.maxPriorityFeePerGas
164-
? toHex(tx.maxPriorityFeePerGas)
165-
: undefined;
167+
transaction.maxPriorityFeePerGas =
168+
typeof tx.maxPriorityFeePerGas === "bigint"
169+
? toHex(tx.maxPriorityFeePerGas)
170+
: undefined;
166171
transaction.type = 2;
167172
} else {
168-
transaction.gasPrice = tx.gasPrice ? toHex(tx.gasPrice) : undefined;
173+
transaction.gasPrice =
174+
typeof tx.gasPrice === "bigint" ? toHex(tx.gasPrice) : undefined;
169175
transaction.type = 0;
170176
}
171-
172177
return signEnclaveTransaction({
173178
client,
174179
storage,

0 commit comments

Comments
 (0)