Skip to content
Merged
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
17 changes: 11 additions & 6 deletions packages/thirdweb/src/auth/verify-signature.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as ox__Bytes from "ox/Bytes";
import { describe, expect, it, test } from "vitest";
import { beforeAll, describe, expect, it, test } from "vitest";
import { FORKED_ETHEREUM_CHAIN } from "../../test/src/chains.js";
import { TEST_CLIENT } from "../../test/src/test-clients.js";
import { TEST_ACCOUNT_A } from "../../test/src/test-wallets.js";
import { ethereum, mainnet } from "../chains/chain-definitions/ethereum.js";
import { sepolia } from "../chains/chain-definitions/sepolia.js";
import type { Account } from "../wallets/interfaces/wallet.js";
import { smartWallet } from "../wallets/smart/smart-wallet.js";
import {
verifyContractWalletSignature,
Expand Down Expand Up @@ -64,7 +65,7 @@ describe("verifyEOASignature", () => {

describe.runIf(process.env.TW_SECRET_KEY)(
"verifyContractWalletSignature",
async () => {
() => {
it("should verify a valid signature", async () => {
expect(
await verifySignature({
Expand Down Expand Up @@ -107,15 +108,19 @@ describe.runIf(process.env.TW_SECRET_KEY)(

describe.runIf(process.env.TW_SECRET_KEY)(
"verifyContractWalletSignature",
async () => {
() => {
const message = "Hakuna matata";
const wallet = smartWallet({
chain: ethereum,
gasless: true,
});
const smartAccount = await wallet.connect({
client: TEST_CLIENT,
personalAccount: TEST_ACCOUNT_A,
let smartAccount: Account;

beforeAll(async () => {
smartAccount = await wallet.connect({
client: TEST_CLIENT,
personalAccount: TEST_ACCOUNT_A,
});
});

test("should verify a smart account signature", async () => {
Expand Down
Loading