Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/social-shoes-start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Account for bigint values in engine wallet typed data
7 changes: 4 additions & 3 deletions packages/thirdweb/src/wallets/engine/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Chain } from "../../chains/types.js";
import type { Hex } from "../../utils/encoding/hex.js";
import { toHex } from "../../utils/encoding/hex.js";
import { stringify } from "../../utils/json.js";
import type { Account, SendTransactionOption } from "../interfaces/wallet.js";

/**
Expand Down Expand Up @@ -108,7 +109,7 @@
const engineRes = await fetch(ENGINE_URL, {
method: "POST",
headers,
body: JSON.stringify(engineData),
body: stringify(engineData),

Check warning on line 112 in packages/thirdweb/src/wallets/engine/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/wallets/engine/index.ts#L112

Added line #L112 was not covered by tests
});
if (!engineRes.ok) {
const body = await engineRes.text();
Expand Down Expand Up @@ -178,7 +179,7 @@
const engineRes = await fetch(ENGINE_URL, {
method: "POST",
headers,
body: JSON.stringify({
body: stringify({

Check warning on line 182 in packages/thirdweb/src/wallets/engine/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/wallets/engine/index.ts#L182

Added line #L182 was not covered by tests
message: engineMessage,
isBytes,
chainId: chain?.id,
Expand All @@ -201,7 +202,7 @@
const engineRes = await fetch(ENGINE_URL, {
method: "POST",
headers,
body: JSON.stringify({
body: stringify({

Check warning on line 205 in packages/thirdweb/src/wallets/engine/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/wallets/engine/index.ts#L205

Added line #L205 was not covered by tests
domain: _typedData.domain,
types: _typedData.types,
value: _typedData.message,
Expand Down