|
1 | 1 | import * as ox__Bytes from "ox/Bytes";
|
2 |
| -import { describe, expect, it, test } from "vitest"; |
| 2 | +import { beforeAll, describe, expect, it, test } from "vitest"; |
3 | 3 | import { FORKED_ETHEREUM_CHAIN } from "../../test/src/chains.js";
|
4 | 4 | import { TEST_CLIENT } from "../../test/src/test-clients.js";
|
5 | 5 | import { TEST_ACCOUNT_A } from "../../test/src/test-wallets.js";
|
6 | 6 | import { ethereum, mainnet } from "../chains/chain-definitions/ethereum.js";
|
7 | 7 | import { sepolia } from "../chains/chain-definitions/sepolia.js";
|
| 8 | +import type { Account } from "../wallets/interfaces/wallet.js"; |
8 | 9 | import { smartWallet } from "../wallets/smart/smart-wallet.js";
|
9 | 10 | import {
|
10 | 11 | verifyContractWalletSignature,
|
@@ -64,7 +65,7 @@ describe("verifyEOASignature", () => {
|
64 | 65 |
|
65 | 66 | describe.runIf(process.env.TW_SECRET_KEY)(
|
66 | 67 | "verifyContractWalletSignature",
|
67 |
| - async () => { |
| 68 | + () => { |
68 | 69 | it("should verify a valid signature", async () => {
|
69 | 70 | expect(
|
70 | 71 | await verifySignature({
|
@@ -107,15 +108,19 @@ describe.runIf(process.env.TW_SECRET_KEY)(
|
107 | 108 |
|
108 | 109 | describe.runIf(process.env.TW_SECRET_KEY)(
|
109 | 110 | "verifyContractWalletSignature",
|
110 |
| - async () => { |
| 111 | + () => { |
111 | 112 | const message = "Hakuna matata";
|
112 | 113 | const wallet = smartWallet({
|
113 | 114 | chain: ethereum,
|
114 | 115 | gasless: true,
|
115 | 116 | });
|
116 |
| - const smartAccount = await wallet.connect({ |
117 |
| - client: TEST_CLIENT, |
118 |
| - personalAccount: TEST_ACCOUNT_A, |
| 117 | + let smartAccount: Account; |
| 118 | + |
| 119 | + beforeAll(async () => { |
| 120 | + smartAccount = await wallet.connect({ |
| 121 | + client: TEST_CLIENT, |
| 122 | + personalAccount: TEST_ACCOUNT_A, |
| 123 | + }); |
119 | 124 | });
|
120 | 125 |
|
121 | 126 | test("should verify a smart account signature", async () => {
|
|
0 commit comments